1use hackerlog::*;
2use std::thread;
3
4fn function_log() {
5 warn!("This is a warning message from a function");
6}
7
8fn function_thread_log() {
9 warn!("This is a warning message from a function");
10}
11
12fn main() {
13 logger().verbose(true);
15
16 info!("This is an info message from main on the main thread");
17
18 thread::spawn(|| {
19 debug!("This is a debug message from another thread");
20 })
21 .join()
22 .unwrap();
23
24 function_log();
25
26 thread::spawn(|| {
27 function_thread_log();
28 })
29 .join()
30 .unwrap();
31}