You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -56,7 +56,7 @@ Alternatively, you can also pass the configurations via environment variables (s
56
56
All supported environment variables can be found [here](docs/EnvVars.md)
57
57
58
58
## Report logs with Python Agent
59
-
The Python agent is capable of reporting collected logs to the backend(SkyWalking OAP/ [SkyWalking Satellite Sidecar](https://github.com/apache/skywalking-satellite)), enabling Log & Trace Correlation.
59
+
The Python agent is capable of reporting collected logs to the backend(SkyWalking OAP), enabling Log & Trace Correlation.
60
60
61
61
Please refer to the [Log Reporter Doc](docs/LogReporter.md) for a detailed guide.
|`SW_AGENT_PROFILE_ACTIVE`| If `True`, Python agent will enable profile when user create a new profile task. Otherwise disable profile. |`False`|
34
34
|`SW_PROFILE_TASK_QUERY_INTERVAL`| The number of seconds between two profile task query. |`20`|
35
35
|`SW_AGENT_LOG_REPORTER_ACTIVE`| If `True`, Python agent will report collected logs to the OAP or Satellite. Otherwise, it disables the feature. |`False`|
36
-
|`SW_AGENT_LOG_COLLECTOR_BACKEND_SERVICES`| The log reporter will use a separate gRPC channel until the [Satellite](https://github.com/apache/skywalking-satellite) project is ready. |`127.0.0.1:11800`|
37
36
|`SW_AGENT_LOG_REPORTER_BUFFER_SIZE`| The maximum queue backlog size for sending log data to backend, logs beyond this are silently dropped. |`10000`|
38
-
|`SW_AGENT_LOG_REPORTER_MESSAGE_SIZE`| Max message size allowed for log transmission. |`10485760`|
39
37
|`SW_AGENT_LOG_REPORTER_LEVEL`| This config specifies the logger levels of concern, any logs with a level below the config will be ignored. |`WARNING`|
38
+
|`SW_AGENT_LOG_IGNORE_FILTER`| This config customizes whether to ignore the application-defined logger filters, if `True`, all logs are reported disregarding any filter rules. |`False`|
40
39
|`SW_AGENT_LOG_REPORTER_FORMATTED`| If `True`, the log reporter will transmit the logs as formatted. Otherwise, puts logRecord.msg and logRecord.args into message content and tags(`argument.n`), respectively. Along with an `exception` tag if an exception was raised. |`True`|
41
40
|`SW_AGENT_LOG_REPORTER_LAYOUT`| The log reporter formats the logRecord message based on the layout given. |`%(asctime)s [%(threadName)s] %(levelname)s %(name)s - %(message)s`|
`log_grpc_reporter_active=True` - Enables the log reporter.
17
17
18
-
`log_grpc_collector_address` - For now, the log reporter uses a separate gRPC channel(will be merged upon the [SkyWalking Satellite Sidecar](https://github.com/apache/skywalking-satellite) project matures).
19
-
If you would like to use the Satellite sidecar, you will need to configure an address pointing to its gatherer. Otherwise, you can simply keep the address the same as the OAP.
20
-
21
-
`log_grpc_reporter_max_buffer_size` and `log_grpc_reporter_max_message_size` - Used to limit the reporting overhead.
18
+
`log_grpc_reporter_max_buffer_size` - The maximum queue backlog size for sending log data to backend, logs beyond this are silently dropped.
22
19
23
20
Alternatively, you can pass configurations through environment variables.
24
21
Please refer to [EnvVars.md](EnvVars.md) for the list of environment variables associated with the log reporter.
@@ -31,6 +28,21 @@ In other words, the agent ignores some unwanted logs based on your level thresho
31
28
32
29
Note that it also works with your custom logger levels, simply specify its string name in the config.
33
30
31
+
### Ignore log filters
32
+
The following config is disabled by default. When enabled, the log reporter will collect logs disregarding your custom log filters.
33
+
34
+
For example, if you attach the filter below to the logger - the default behavior of log reporting aligns with the filter
35
+
(not reporting any logs with a message starting with `SW test`)
If the layout is set to `None`, the reported log content will only contain the pre-formatted `LogRecord.message`(`msg % args`) without any additional styles and information.
61
+
If the layout is set to `None`, the reported log content will only contain the pre-formatted `LogRecord.message`(`msg % args`) without any additional styles, information or extra fields.
50
62
51
63
### Transmit un-formatted logs
52
64
You can also choose to report the log messages without any formatting.
@@ -55,7 +67,7 @@ It separates the raw log msg `logRecord.msg` and `logRecord.args`, then puts the
55
67
Note when you set `log_grpc_reporter_formatted` to False, it ignores your custom layout introduced above.
56
68
57
69
As an example, the following code:
58
-
```Python
70
+
```python
59
71
logger.info("SW test log %s%s%s", 'arg0', 'arg1', 'arg2')
0 commit comments