Skip to content

Commit

Permalink
Make config compatible with salt 3004
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor Zhestkov authored and Victor Zhestkov committed Jun 5, 2023
1 parent cd0f596 commit edd2fb5
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions saline/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,24 @@
import salt.utils.user

from salt.config import _validate_opts
from salt._logging import (
DFLT_LOG_DATEFMT,
DFLT_LOG_DATEFMT_LOGFILE,
DFLT_LOG_FMT_CONSOLE,
DFLT_LOG_FMT_JID,
DFLT_LOG_FMT_LOGFILE,
)
try:
from salt._logging import (
DFLT_LOG_DATEFMT,
DFLT_LOG_DATEFMT_LOGFILE,
DFLT_LOG_FMT_CONSOLE,
DFLT_LOG_FMT_JID,
DFLT_LOG_FMT_LOGFILE,
)
except ImportError:
# Reuired to be compatible with Salt 3004
DFLT_LOG_DATEFMT = "%H:%M:%S"
DFLT_LOG_DATEFMT_LOGFILE = "%Y-%m-%d %H:%M:%S"
DFLT_LOG_FMT_CONSOLE = "[%(levelname)-8s] %(message)s"
DFLT_LOG_FMT_JID = "[JID: %(jid)s]"
DFLT_LOG_FMT_LOGFILE = (
"%(asctime)s,%(msecs)03d [%(name)-17s:%(lineno)-4d][%(levelname)-8s][%(process)d]"
" %(message)s"
)


log = logging.getLogger(__name__)
Expand Down

0 comments on commit edd2fb5

Please sign in to comment.