forked from cookiemonstermayhem/tarigpuminer
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add gpu detect & log config (#14)
Within this pr: 1. add log config log4rs & logging bug fixes 2. add `detect` feature to check if gpu mining is available
- Loading branch information
Showing
8 changed files
with
160 additions
and
45 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# A sample log configuration file for running in release mode. | ||
# | ||
# See https://docs.rs/log4rs/0.8.3/log4rs/encode/pattern/index.html for deciphering the log pattern. The log format | ||
# used in this sample configuration prints messages as: | ||
# timestamp [target] LEVEL message | ||
refresh_rate: 30 seconds | ||
appenders: | ||
# An appender named "stdout" that writes to stdout | ||
stdout: | ||
kind: console | ||
encoder: | ||
pattern: "{d(%H:%M)} {h({l}):5} {m}{n}" | ||
filters: | ||
- kind: threshold | ||
level: info | ||
|
||
# An appender named "base_layer" that writes to a file with a custom pattern encoder | ||
xtrgpuminer: | ||
kind: rolling_file | ||
path: "{{log_dir}}/log/xtrgpuminer.log" | ||
policy: | ||
kind: compound | ||
trigger: | ||
kind: size | ||
limit: 10mb | ||
roller: | ||
kind: fixed_window | ||
base: 1 | ||
count: 5 | ||
pattern: "{{log_dir}}/log/xtrgpuminer.{}.log" | ||
encoder: | ||
pattern: "{d(%Y-%m-%d %H:%M:%S.%f)} {l:5} {m} // {f}:{L}{n}" | ||
|
||
# Set the default logging level to "info" | ||
root: | ||
level: info | ||
appenders: | ||
- stdout | ||
- xtrgpuminer | ||
|
||
loggers: | ||
# Route log events common to every application to all appenders | ||
tari::gpuminer: | ||
level: info | ||
appenders: | ||
- stdout | ||
- default | ||
additive: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.