Skip to content

日志记录到文件 #2177

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

Open
okami-chen opened this issue Apr 28, 2025 · 0 comments
Open

日志记录到文件 #2177

okami-chen opened this issue Apr 28, 2025 · 0 comments

Comments

@okami-chen
Copy link

日志目录是空的,使用docker部署的

<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="DEBUG">
  <Appenders>
    <Console name="Console" target="SYSTEM_ERR">
      <PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss} %-5level %logger{1} - %msg%n"/>
    </Console>

    <RollingFileAppender name="RollingFile"
                 fileName="logs/maxwell.log"
                 filePattern="logs/maxwell-%d{yyyy-MM-dd}-%i.log">
      <PatternLayout>
        <Pattern>%d{yyyy-MM-dd HH:mm:ss} %-5level %logger{1} - %msg%n</Pattern>
      </PatternLayout>
      <Policies>
        <SizeBasedTriggeringPolicy size="100MB"/>
      </Policies>
      <DefaultRolloverStrategy max="10"/>
    </RollingFileAppender>

  </Appenders>

  <Loggers>
    <Root level="debug">
      <AppenderRef ref="Console"/>
      <AppenderRef ref="RollingFile"/>
    </Root>

    <Logger name="com.mchange.v2" level="error" additivity="false">
      <AppenderRef ref="Console"/>
      <AppenderRef ref="RollingFile"/>
    </Logger>
  </Loggers>
</Configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant