Skip to content

Commit b65e98e

Browse files
authored
RHDHBUGS-1883: Added log level details (#1278)
* Added log level details * Giving a higher visibility to content * Added a lead-in para * Incorporated Judy's comments * Fixed typo
1 parent 1e4feaf commit b65e98e

File tree

3 files changed

+21
-3
lines changed

3 files changed

+21
-3
lines changed

assemblies/assembly-log-levels.adoc

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[id="assembly-log-levels_{context}"]
2+
= Log Levels
3+
4+
Logging is an essential part of monitoring and debugging software applications. It provides insight into how the application is functioning at runtime and can help you detect and diagnose issues. By adjusting the log level, you can control the amount and type of information displayed in the logs, ranging from highly detailed diagnostic output to the most critical errors. With this flexibility, you can customize logging output to match your current requirements, whether during development, testing, or production.
5+
6+
You can choose from the following log levels, listed in order of decreasing verbosity:
7+
8+
- `debug`: Detailed information, typically useful only when troubleshooting.
9+
- `info`: General information about the operation of the application. This is the default level.
10+
- `warn`: Indicates potential issues or situations that might require attention.
11+
- `error`: Indicates errors that have occurred but might not prevent the application from continuing.
12+
- `critical`: Indicates critical errors that require immediate attention and are likely to prevent the application from functioning correctly.
13+
14+
You can control the verbosity of the logging by setting the log level. The log level determines the minimum severity level of events displayed in the console. For example, if the log level is set to 'info', events with a severity level of 'debug' are ignored.
15+
16+
To increase the log level, you can set the `LOG_LEVEL` environment variable to a higher severity level, such as 'warn' or 'error'. However, increasing the log level might not result in more output if the existing code primarily emits logs at lower severity levels, for example, 'debug' or 'info'. In such a case, adjust the logging statements within the code to use higher severity levels to see more output.
17+
18+
No additional steps are required beyond setting the `LOG_LEVEL` environment variable, but its effectiveness depends on the existing logging statements in the code.

assemblies/assembly-logging-with-amazon-cloudwatch.adoc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
= Logging with Amazon CloudWatch
33

44
Logging within the {product} relies on the link:https://github.com/winstonjs/winston[Winston library].
5-
The default logging level is `info`.
6-
To have more detailed logs, set the `LOG_LEVEL` environment variable to `debug` in your {product} instance.
7-
85

96
include::modules/observe/proc-configuring-the-application-log-level-for-logging-with-amazon-cloudwatch-logs-by-using-the-operator.adoc[leveloffset=+1]
107

titles/monitoring-and-logging/master.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ include::artifacts/attributes.adoc[]
77

88
= {title}
99

10+
//log levels info
11+
include::assemblies/assembly-log-levels.adoc[leveloffset=+1]
12+
1013
//metrics
1114
include::assemblies/assembly-rhdh-observability.adoc[leveloffset=+1]
1215

0 commit comments

Comments
 (0)