Jobserver Log in JSON Format

I have done the following configuration (in globallog.config) for logging JobServer output to a json file

<target name="jsonFile" xsi:type="File" fileName="${logBaseDir}/${appName}.log.json" >
<layout xsi:type="JsonLayout" includeAllProperties="True" >
<attribute name="time" layout="${longdate}" />
<attribute name="level" layout="${level:upperCase=true}"/>
<attribute name="message" layout="${message}" />
</layout>
</target>

<logger name="*" minlevel="Info" writeTo="jsonFile"/>

Now the output looks like this:

{ "time": "2020-02-25 09:05:39.7461"
, "level": "ERROR"
, "message": "VI.Projector.JobComponent.ProjectorComponent - e32c3ac0-c3c2-41bb-837e-705170097117: Errors occurred\r\n [2134003] Error executing synchronization.\r\n [1777018] Error executing synchronization project (Azure Active Directory tenant 'xxxxxx')'s workflow (Initial Synchronization).\r\n [1777292] Error connecting system (AzureAD)!\r\n [System.Exception] [AdalServiceException]: AADSTS7000215: Invalid client secret is provided.\r\n Trace ID: 7ec046ce-309a-49bd-b20f-deac70beab00\r\n Correlation ID: 8a399f0f-2c7a-4317-b981-15b49dee1a61\r\n Timestamp: 2020-02-25 08:05:39Z\n[HttpRequestException]: Response status code does not indicate success: 401 (Unauthorized).\n[AdalException]: {\"error\":\"invalid_client\",\"error_description\":\"AADSTS7000215: Invalid client secret is provided.\\r\\nTrace ID: 7ec046ce-309a-49bd-b20f-deac70beab00\\r\\nCorrelation ID: 8a399f0f-2c7a-4317-b981-15b49dee1a61\\r\\nTimestamp: 2020-02-25 08:05:39Z\",\"error_codes\":[7000215],\"timestamp\":\"2020-02-25 08:05:39Z\",\"trace_id\":\"7ec046ce-309a-49bd-b20f-deac70beab00\",\"correlation_id\":\"8a399f0f-2c7a-4317-b981-15b49dee1a61\",\"error_uri\":\"https:\/\/login.windows.net\/error?code=7000215\"}: Unknown error\n[AdalException]: {\"error\":\"invalid_client\",\"error_description\":\"AADSTS7000215: Invalid client secret is provided.\\r\\nTrace ID: 7ec046ce-309a-49bd-b20f-deac70beab00\\r\\nCorrelation ID: 8a399f0f-2c7a-4317-b981-15b49dee1a61\\r\\nTimestamp: 2020-02-25 08:05:39Z\",\"error_codes\":[7000215],\"timestamp\":\"2020-02-25 08:05:39Z\",\"trace_id\":\"7ec046ce-309a-49bd-b20f-deac70beab00\",\"correlation_id\":\"8a399f0f-2c7a-4317-b981-15b49dee1a61\",...eAsync>d__31.MoveNext()\r\n ---- Start of Inner Exception ----\r\n \r\n" }


What I'm really expecting is something like this message from Manager.exe log shows:

{ "time": "2020-02-25 08:45:30.4015", "level": "DEBUG", "message": "(19 ms) - COMMIT TRANSACTION", "SessionId": "c135a3d1-b698-46a0-9198-e18e5f3f5d83", "conn": 1, "type": "Other", "query": "COMMIT TRANSACTION", "start": 1582616730382.57, "duration": 19.105, "parameters": null, "Parent": null, "Indention": "" }


There shouldn't be a big formatted "message" which is useful in a txt logfile, but not in json.

Is there a way to have the jobservice json logfile with the content splittet into attributes?


Something like

{..., "component": "VI.Projector.JobComponent.ProjectorComponent", "SessionID":"e32c3ac0-c3c2-41bb-837e-705170097117", "ErrorCode" : "2134003", ...}

{

Parents Reply Children
No Data