Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recover log4rs.yml of graphscope-store and fix the log output location #814

Merged
merged 4 commits into from
Sep 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions interactive_engine/conf/log4rs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ appenders:
limit: 200mb
roller:
kind: fixed_window
pattern: "${env:LOG_DIRS:-/home/admin/logs}/executor.log.{}"
pattern: "${env:LOG_DIRS:-/tmp/logs}/executor.log.{}"
count: 4
query:
kind: env_rolling_file
append: true
path: "${env:LOG_DIRS:-/home/admin/logs}/query.log"
path: "${env:LOG_DIRS:-/tmp/logs}/query.log"
encoder:
pattern: "{m}{n}"
policy:
Expand All @@ -31,12 +31,12 @@ appenders:
limit: 32mb
roller:
kind: fixed_window
pattern: "${env:LOG_DIRS:-/home/admin/logs}/query.log.{}"
pattern: "${env:LOG_DIRS:-/tmp/logs}/query.log.{}"
count: 1
store:
kind: env_rolling_file
append: true
path: "${env:LOG_DIRS:-/home/admin/logs}/store.log"
path: "${env:LOG_DIRS:-/tmp/logs}/store.log"
encoder:
pattern: "{m}{n}"
policy:
Expand All @@ -45,12 +45,12 @@ appenders:
limit: 32mb
roller:
kind: fixed_window
pattern: "${env:LOG_DIRS:-/home/admin/logs}/store.log.{}"
pattern: "${env:LOG_DIRS:-/tmp/logs}/store.log.{}"
count: 1
runtime:
kind: env_rolling_file
append: true
path: "${env:LOG_DIRS:-/home/admin/logs}/runtime.log"
path: "${env:LOG_DIRS:-/tmp/logs}/runtime.log"
encoder:
pattern: "{m}{n}"
policy:
Expand All @@ -59,12 +59,12 @@ appenders:
limit: 32mb
roller:
kind: fixed_window
pattern: "${env:LOG_DIRS:-/home/admin/logs}/runtime.log.{}"
pattern: "${env:LOG_DIRS:-/tmp/logs}/runtime.log.{}"
count: 1
alert:
kind: env_rolling_file
append: true
path: "${env:LOG_DIRS:-/home/admin/logs}/alert.log"
path: "${env:LOG_DIRS:-/tmp/logs}/alert.log"
encoder:
pattern: "{m}{n}"
policy:
Expand All @@ -73,7 +73,7 @@ appenders:
limit: 32mb
roller:
kind: fixed_window
pattern: "${env:LOG_DIRS:-/home/admin/logs}/alert.log.{}"
pattern: "${env:LOG_DIRS:-/tmp/logs}/alert.log.{}"
count: 1

root:
Expand Down
2 changes: 1 addition & 1 deletion interactive_engine/distribution/src/bin/store_ctl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ _setup_maxgraph_env() {
export LD_LIBRARY_PATH=${MAXGRAPH_HOME}/native:${LD_LIBRARY_PATH}:/usr/local/lib

if [ -z "${LOG_DIR}" ]; then
LOG_DIR="/tmp/graphscope-store"
export LOG_DIR="/tmp/graphscope-store"
fi

mkdir -p ${LOG_DIR}
Expand Down
100 changes: 9 additions & 91 deletions interactive_engine/distribution/src/conf/log4rs.yml
Original file line number Diff line number Diff line change
@@ -1,109 +1,27 @@
refresh_rate: 10 seconds

refresh_rate: 30 seconds
appenders:
stdout:
kind: console
encoder:
pattern: "{d(%Y-%m-%d %H:%M:%S.%f)} {h({l:<5})} (({f}:{L})) [{T}] {m}{n}"
executor:
kind: env_rolling_file
file:
kind: rolling_file
append: true
path: "${env:LOG_DIRS:-./}/executor.log"
path: "/tmp/graphscope-store/store-executor.log"
encoder:
pattern: "{d(%Y-%m-%d %H:%M:%S.%f)} {h({l:<5})} (({f}:{L})) [{T}] {m}{n}"
policy:
trigger:
kind: size
limit: 200mb
roller:
kind: fixed_window
pattern: "${env:LOG_DIRS:-/home/admin/logs}/executor.log.{}"
count: 4
query:
kind: env_rolling_file
append: true
path: "${env:LOG_DIRS:-/home/admin/logs}/query.log"
encoder:
pattern: "{m}{n}"
policy:
trigger:
kind: size
limit: 32mb
roller:
kind: fixed_window
pattern: "${env:LOG_DIRS:-/home/admin/logs}/query.log.{}"
count: 1
store:
kind: env_rolling_file
append: true
path: "${env:LOG_DIRS:-/home/admin/logs}/store.log"
encoder:
pattern: "{m}{n}"
policy:
trigger:
kind: size
limit: 32mb
roller:
kind: fixed_window
pattern: "${env:LOG_DIRS:-/home/admin/logs}/store.log.{}"
count: 1
runtime:
kind: env_rolling_file
append: true
path: "${env:LOG_DIRS:-/home/admin/logs}/runtime.log"
encoder:
pattern: "{m}{n}"
policy:
trigger:
kind: size
limit: 32mb
roller:
kind: fixed_window
pattern: "${env:LOG_DIRS:-/home/admin/logs}/runtime.log.{}"
count: 1
alert:
kind: env_rolling_file
append: true
path: "${env:LOG_DIRS:-/home/admin/logs}/alert.log"
encoder:
pattern: "{m}{n}"
policy:
trigger:
kind: size
limit: 32mb
limit: 100mb
roller:
kind: fixed_window
pattern: "${env:LOG_DIRS:-/home/admin/logs}/alert.log.{}"
count: 1
pattern: "/tmp/graphscope-store/store-executor.log.{}"
count: 10

root:
level: info
appenders:
- executor
- file
- console

loggers:
maxgraph-store:
level: info
additive: false
appenders:
- executor
logging-query:
level: info
additive: false
appenders:
- query
logging-store:
level: info
additive: false
appenders:
- store
logging-runtime:
level: info
additive: false
appenders:
- runtime
logging-alert:
level: info
additive: false
appenders:
- alert
2 changes: 1 addition & 1 deletion interactive_engine/distribution/src/conf/logback.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<configuration>
<property name="log_dir" value="${log.dir:-./logs}"/>
<property name="log_dir" value="${log.dir:-/tmp/graphscope-store}"/>
<property name="log_name" value="${log.name:-maxgraph}"/>
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${log_dir}/${log_name}.log</file>
Expand Down
2 changes: 1 addition & 1 deletion interactive_engine/distribution/src/conf/logback_debug.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<configuration>
<property name="log_dir" value="${log.dir:-./logs}"/>
<property name="log_dir" value="${log.dir:-/tmp/graphscope-store}"/>
<property name="log_name" value="${log.name:-maxgraph}"/>
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${log_dir}/${log_name}.log</file>
Expand Down