File tree Expand file tree Collapse file tree 1 file changed +18
-7
lines changed
Expand file tree Collapse file tree 1 file changed +18
-7
lines changed Original file line number Diff line number Diff line change 77import salt.utils.user
88
99from salt.config import _validate_opts
10- from salt._logging import (
11- DFLT_LOG_DATEFMT,
12- DFLT_LOG_DATEFMT_LOGFILE,
13- DFLT_LOG_FMT_CONSOLE,
14- DFLT_LOG_FMT_JID,
15- DFLT_LOG_FMT_LOGFILE,
16- )
10+ try:
11+ from salt._logging import (
12+ DFLT_LOG_DATEFMT,
13+ DFLT_LOG_DATEFMT_LOGFILE,
14+ DFLT_LOG_FMT_CONSOLE,
15+ DFLT_LOG_FMT_JID,
16+ DFLT_LOG_FMT_LOGFILE,
17+ )
18+ except ImportError:
19+ # Reuired to be compatible with Salt 3004
20+ DFLT_LOG_DATEFMT = "%H:%M:%S"
21+ DFLT_LOG_DATEFMT_LOGFILE = "%Y-%m-%d %H:%M:%S"
22+ DFLT_LOG_FMT_CONSOLE = "[%(levelname)-8s] %(message)s"
23+ DFLT_LOG_FMT_JID = "[JID: %(jid)s]"
24+ DFLT_LOG_FMT_LOGFILE = (
25+ "%(asctime)s,%(msecs)03d [%(name)-17s:%(lineno)-4d][%(levelname)-8s][%(process)d]"
26+ " %(message)s"
27+ )
1728
1829
1930log = logging.getLogger(__name__)
You can’t perform that action at this time.
0 commit comments