Skip to content

Commit e0f8c71

Browse files
authored
fix(docs): jans logging configuration - VM Operation Guide - 1 (#3348)
1 parent a39b61e commit e0f8c71

File tree

1 file changed

+43
-39
lines changed

1 file changed

+43
-39
lines changed

docs/admin/vm-ops/logs.md

+43-39
Original file line numberDiff line numberDiff line change
@@ -24,44 +24,48 @@ The following log levels can be configured through the configuration CLI:
2424
### Configuring Log Levels
2525
Use the following commands to get information on the logging module configuration:
2626

27-
```bash
28-
$ /opt/jans/jans-cli/config-cli.py --info ConfigurationLogging
29-
# Log configuration operations
30-
Operation ID: get-config-logging
31-
Description: Returns Jans Authorization Server logging settings.
32-
Operation ID: put-config-logging
33-
Description: Updates Jans Authorization Server logging settings.
34-
Schema: /components/schemas/LoggingConfiguration
35-
36-
To get sample schema type /opt/jans/jans-cli/config-cli.py --schema <schma>, for example /opt/jans/jans-cli/config-cli.py --schema /components/schemas/LoggingConfiguration
37-
38-
$ /opt/jans/jans-cli/config-cli.py --schema /components/schemas/LoggingConfiguration
39-
# Generic configuration schema
40-
{
41-
"loggingLevel": "TRACE",
42-
"loggingLayout": "json",
43-
"httpLoggingEnabled": true,
44-
"disableJdkLogger": false,
45-
"enabledOAuthAuditLogging": true,
46-
"externalLoggerConfiguration": null,
47-
"httpLoggingExcludePaths": [
48-
"/auth/img",
49-
"/auth/stylesheet"
50-
]
51-
}
52-
53-
$ /opt/jans/jans-cli/config-cli.py --operation-id get-config-logging
54-
# Current log configuration
55-
{
56-
"loggingLevel": "INFO",
57-
"loggingLayout": "text",
58-
"httpLoggingEnabled": false,
59-
"disableJdkLogger": true,
60-
"enabledOAuthAuditLogging": false,
61-
"externalLoggerConfiguration": null,
62-
"httpLoggingExcludePaths": null
63-
}
64-
```
27+
- To get the logging configuration operation ID: `/opt/jans/jans-cli/config-cli.py --info ConfigurationLogging`
28+
- Output would be:
29+
```
30+
# Log configuration operations
31+
Operation ID: get-config-logging
32+
Description: Returns Jans Authorization Server logging settings.
33+
Operation ID: put-config-logging
34+
Description: Updates Jans Authorization Server logging settings.
35+
Schema: /components/schemas/LoggingConfiguration
36+
```
37+
- To get sample schema type /opt/jans/jans-cli/config-cli.py --schema <schma>,
38+
for example `/opt/jans/jans-cli/config-cli.py --schema /components/schemas/LoggingConfiguration`
39+
- Output:
40+
```
41+
# Generic configuration schema
42+
{
43+
"loggingLevel": "TRACE",
44+
"loggingLayout": "json",
45+
"httpLoggingEnabled": true,
46+
"disableJdkLogger": false,
47+
"enabledOAuthAuditLogging": true,
48+
"externalLoggerConfiguration": null,
49+
"httpLoggingExcludePaths": [
50+
"/auth/img",
51+
"/auth/stylesheet"
52+
]
53+
}
54+
```
55+
- Status of current configuration logging: `/opt/jans/jans-cli/config-cli.py --operation-id get-config-logging`
56+
- Output:
57+
```
58+
# Current log configuration
59+
{
60+
"loggingLevel": "INFO",
61+
"loggingLayout": "text",
62+
"httpLoggingEnabled": false,
63+
"disableJdkLogger": true,
64+
"enabledOAuthAuditLogging": false,
65+
"externalLoggerConfiguration": null,
66+
"httpLoggingExcludePaths": null
67+
}
68+
```
6569
6670
Let's assume we want to update logging configuration to `TRACE`. To do this, create a file `/tmp/log.json` with the following content:
6771
```json
@@ -77,7 +81,7 @@ Let's assume we want to update logging configuration to `TRACE`. To do this, cre
7781
```
7882
And use the PUT operation with this file as the payload:
7983
```
80-
$ /opt/jans/jans-cli/config-cli.py --operation-id put-config-logging --data /tmp/log.json
84+
/opt/jans/jans-cli/config-cli.py --operation-id put-config-logging --data /tmp/log.json
8185
```
8286
The server will now have logs set to TRACE.
8387

0 commit comments

Comments
 (0)