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: src/development_tools/debugging/config_log/log-custom.md
+4-4
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ Configures log to be output into custom location with [log4rs]. [log4rs] can use
8
8
Firstly creates the log configuration with [`log4rs::append::file::FileAppender`]
9
9
using a custom pattern from [`log4rs::encode::pattern`].
10
10
11
-
Secondly assigns it to the [`log4rs::config::Config`] which has a root appender that uses the previously created `logfile` appender. Subsequently sets the default [`log::LogLevelFilter`] so that any logs with `Info` level or higher will be sent to the logger.
11
+
Secondly assigns it to the [`log4rs::config::Config`] which has a root appender that uses the previously created `logfile` appender. Subsequently sets the default [`log::LevelFilter`] so that any logs with `Info` level or higher will be sent to the logger.
12
12
13
13
```rust,no_run
14
14
# #[macro_use]
@@ -17,7 +17,7 @@ Secondly assigns it to the [`log4rs::config::Config`] which has a root appender
Creates a custom logger configuration with [`LogBuilder`].
6
+
Creates a custom logger configuration with [`Builder`].
7
7
Each log entry calls [`Local::now`] to get the current [`DateTime`] in local timezone and uses [`DateTime::format`] with [`strftime::specifiers`] to format a timestamp used in the final log.
8
8
9
-
The example calls [`LogBuilder::format`] to set a closure which formats each
10
-
message text with timestamp, [`LogRecord::level`] and body ([`LogRecord::args`]).
9
+
The example calls [`Builder::format`] to set a closure which formats each
10
+
message text with timestamp, [`Record::level`] and body ([`Record::args`]).
0 commit comments