Forum Discussion

sudhir_sbevision_com's avatar
1 year ago
Solved

Server logging for Aras 31

Hello Experts, As the title says, we are on Aras 31 and building some custom code in a dll, trying to understand the new way of logging in C# classes Looking at the release notes here, there i...
  • eli_donahue's avatar
    1 year ago

    Hi Sudhir,

    Try this instead:

    CCO.Logger.LogError('message');

    I'll file a doc issue to update the programmer's guide with the right sample.

  • carstenw's avatar
    1 year ago

    Hi,

    On R32 I'm doing it like this. Hope this helps

    [embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:2e67c496-fc22-408a-ba1c-2b27b4e54496:type=text&text=var%20cco%20%3D%20%28%28Aras.Server.Core.IOMConnection%29%20serverConnection%29.CCO%3B%0Acco.Logger.Log%28LogLevel.Warning%2C%20%24%22Your%20message%20here%22%29%3B]

  • viettpv's avatar
    viettpv
    1 year ago

    carstenw 

    When using the above API, I couldn't find the log file.

  • sudhir_sbevision_com's avatar
    1 year ago

    What we found was we had to add some config in the app setting file

    • Edit the appsettings.json from the directory of your Aras Innovator installation e.g.(C:\Aras29\Innovator\Innovator\Server\appsettings.json)

    • Update the LoggerConfiguration section from the appsettings.json with below code.

    • "LoggerConfiguration": { "MinimumLevel": { "Default": "Debug" }, "WriteTo": [ { "Name": "File", "Args": { "path": "Logs\Aras_Log.txt", "rollingInterval": "Day" } } ] },

    The log file mentioned here was later used by the logger

    pls note you will have to restart IIS