logback.xml配置文件引入问题求指教 10C

我想知道logback.xml配置文件是怎么被引入到项目中的,全局搜索工程却没发现任何一个地方引入该配置文件,但却生效了可以打出日志,怎么回事??

3个回答

启动时自动扫描加载的,默认配置项。

chenguoqing666
Humorist 回复u010287873: Logback默认配置的步骤 (1). 尝试在classpath下查找文件logback-test.xml; (2). 如果文件不存在,则查找文件logback.xml; (3). 如果配置文件logback-test.xml和logback.xml都不存在,那么logback默认地会调用BasicConfigurator ,创建一个最小化配置。最小化配置由一个关联到根logger的ConsoleAppender组成。输出用模式为%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n的PatternLayoutEncoder进行格式化。root logger默认级别是DEBUG。
一年多之前 回复
gf0515
Fatal Error LoggerFactory.getLogger 这地方一层层跟进去可以看到的
一年多之前 回复
u010287873
点滴记录,是前进的脚步 它的默认配置是啥?
一年多之前 回复

很简单,logback若不进行自定义配置,那么就加载本身的一个默认配置!

u010287873
点滴记录,是前进的脚步 它的默认配置是啥?
一年多之前 回复

有些框架会加载使用约定好的配置文件名字,并且配置文件名称不同优先级也不同,比如SpringBoot

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
logback.groovy配置文件中选择环境的问题请教
logback.groovy配置文件中有四行代码不明白,麻烦谁会解释下: def props = new Properties() props.load(this.getClass().getClassLoader().getResourceAsStream("properties/application.properties")) def config = new ConfigSlurper().parse(props) def env = System.properties['spring.profiles.active'] ?: 'production'
logback插件的logback.xml 增加一个自定义属性 怎么获取值
logback.xml配置如下: <?xml version="1.0" encoding="UTF-8"?> <configuration> <property name="LOG_HOME" value="${user.home}/logs/${appname}" /> <property name="IF_LINE" value="true" /> IF_LINE是自定义增加的属性值,在logback的源代码中如何获取这个属性值?
Java Spring Boot 添加 logback.xml 报错
## 这是我的项目架构 ![项目架构](https://img-ask.csdn.net/upload/201712/20/1513749374_354432.png) ### 这是我的controller package com.hatom.dashitwelve.controller; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @RestController public class IndexController { //logback private final static Logger logger = LoggerFactory.getLogger(IndexController.class); /** * 访问首页 * @return */ @RequestMapping(value = "/index") public String index(){ logger.debug("记录debug日志"); logger.info("访问了index方法"); logger.error("记录error错误日志"); return "index"; } } ### 这是我的 logback.xml <?xml version="1.0" encoding="UTF-8" ?> <configuration debug="false"> <!--定义日志文件的存储地址 勿在 LogBack 的配置中使用相对路径--> <property name="LOG_HOME" value="./logs" /> <!--控制台输出--> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"> <!--格式化输出 :%d 表示日期,%thread 表示线程名,%-5level 级别从左显示5个字符宽度,%msg 日志消息,%n 换行符--> <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern> </encoder> </appender> <!--按照每天生成日志文件--> <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <!--日志文件输出的文件名--> <FileNamePattern>${LOG_HOME}/runtime.log.%d{yyyy-MM-dd}.log</FileNamePattern> <!--日志文件保留天数--> <MaxHistory>30</MaxHistory> </rollingPolicy> <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"> <!--格式化输出 :%d 表示日期,%thread 表示线程名,%-5level 级别从左显示5个字符宽度,%msg 日志消息,%n 换行符--> <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern> </encoder> <!--日志文件最大的大小--> <triggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <MaxFileSize>10MB</MaxFileSize> </triggeringPolicy> </appender> <!--日志输出级别--> <root level="INFO"> <appender_ref ref="STDOUT"/> <appender_ref ref="FILE"/> </root> </configuration> ### 控制台输出 ![图1](https://img-ask.csdn.net/upload/201712/20/1513751298_100903.png) ![图2](https://img-ask.csdn.net/upload/201712/20/1513751425_673615.png) ### 希望知情认士可以耐心解答,谢谢
logback日志数量修改问题
现在需要将logback的最大日志数量提高到40个,由于logback内部最大只支持20个,设置超过20后也只输出20个文件。 重写FixedWindowRollingPolicy类如下: package com.logback.test; import ch.qos.logback.core.rolling.FixedWindowRollingPolicy; public class CustomFixedWindowRollingPolicy extends FixedWindowRollingPolicy { private static int MAX_WINDOW_SIZE = 500; @Override protected int getMaxWindowSize() { return MAX_WINDOW_SIZE; } } logback.xml配置如下: <appender name="realMasterAppender" class="ch.qos.logback.core.rolling.RollingFileAppender"> <File>${log.home}/real.log</File> <rollingPolicy class="com.logback.test.CustomFixedWindowRollingPolicy"> <fileNamePattern>${log.home}/real.log.%i</fileNamePattern> <minIndex>1</minIndex> <maxIndex>100</maxIndex> </rollingPolicy> <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> <maxFileSize>40MB</maxFileSize> </triggeringPolicy> <encoder> <pattern>%date %level [%file : %line] %msg%n</pattern> </encoder> <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> <level>DEBUG</level> </filter> </appender> 运行后后台报错如下: 17:32:44,585 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property 17:32:44,632 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender] 17:32:44,632 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [infoAppender] 17:32:44,632 |-ERROR in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Could not create component [rollingPolicy] of type [com.logback.test.CustomFixedWindowRollingPolicy] java.lang.ClassNotFoundException: com.logback.test.CustomFixedWindowRollingPolicy at java.lang.ClassNotFoundException: com.logback.test.CustomFixedWindowRollingPolicy at at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:494) at at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410) at at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:398) at at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:105) at at java.lang.ClassLoader.loadClass(Unknown Source) at at ch.qos.logback.core.util.Loader.loadClass(Loader.java:124) at at ch.qos.logback.core.joran.action.NestedComplexPropertyIA.begin(NestedComplexPropertyIA.java:100) at at ch.qos.logback.core.joran.spi.Interpreter.callBeginAction(Interpreter.java:275) at at ch.qos.logback.core.joran.spi.Interpreter.startElement(Interpreter.java:147) at at ch.qos.logback.core.joran.spi.Interpreter.startElement(Interpreter.java:129) at at ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:50) 求解啊!
slf4j logback日志输出至不同的文件中,日志文件名在程序中动态指定
现在我需要将不同的日志输出至不同的文件中,我怎么在logback.xml文件中配置,然后在代码中动态指定文件名,将不同的日志输出到不同的日志文件中嗯? 有谁能帮我写个logback.xml文件代码和具体的java使用代码么? 万分感谢。
springboot配置好了logback之后,项目启动时只打印logback配置信息,打印完成后项目就停止运行
springboot配置好了logback之后,项目启动时只打印logback配置信息,打印完成后项目就停止运行了.有没有大神帮忙分析下是什么问题. 使用的是最简单的logback配置, ``` <?xml version="1.0" encoding="UTF-8"?> <configuration debug="false"> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <layout class="ch.qos.logback.classic.PatternLayout"> <Pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</Pattern> </layout> </appender> <root level="DEBUG"> <appender-ref ref="STDOUT" /> </root> </configuration> ``` 下面是项目启动后控制台的打印日志: 14:55:11,219 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy] 14:55:11,220 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml] 14:55:11,220 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [file:/U:/eclipseWork/small_platform/project-demo/client/target/classes/logback.xml] 14:55:11,333 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set 14:55:11,347 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender] 14:55:11,356 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT] 14:55:11,483 |-WARN in ch.qos.logback.core.ConsoleAppender[STDOUT] - This appender no longer admits a layout as a sub-component, set an encoder instead. 14:55:11,484 |-WARN in ch.qos.logback.core.ConsoleAppender[STDOUT] - To ensure compatibility, wrapping your layout in LayoutWrappingEncoder. 14:55:11,484 |-WARN in ch.qos.logback.core.ConsoleAppender[STDOUT] - See also http://logback.qos.ch/codes.html#layoutInsteadOfEncoder for details 14:55:11,484 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to DEBUG 14:55:11,484 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT] to Logger[ROOT] 14:55:11,485 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration. 14:55:11,488 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@506e6d5e - Registering current configuration as safe fallback point
springboot 配置logback-spring.xml 无法引用application.yml 中的配置
![图片说明](https://img-ask.csdn.net/upload/201911/28/1574929837_608049.png)![图片说明](https://img-ask.csdn.net/upload/201911/28/1574929844_953531.png) ERROR in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@48eefed5 - maxFileSize property is mandatory. at org.springframework.boot.logging.logback.LogbackLoggingSystem.loadConfiguration(LogbackLoggingSystem.java:169) at org.springframework.boot.logging.AbstractLoggingSystem.initializeWithConventions(AbstractLoggingSystem.java:80) at org.springframework.boot.logging.AbstractLoggingSystem.initialize(AbstractLoggingSystem.java:60) at org.springframework.boot.logging.logback.LogbackLoggingSystem.initialize(LogbackLoggingSystem.java:118) at org.springframework.boot.context.logging.LoggingApplicationListener.initializeSystem(LoggingApplicationListener.java:313) at org.springframework.boot.context.logging.LoggingApplicationListener.initialize(LoggingApplicationListener.java:288) at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEnvironmentPreparedEvent(LoggingApplicationListener.java:246) at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEvent(LoggingApplicationListener.java:223) at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165) at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:127) at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:76) at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:53) at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:345) at org.springframework.boot.SpringApplication.run(SpringApplication.java:308) at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:140) at org.springframework.cloud.bootstrap.BootstrapApplicationListener.bootstrapServiceContext(BootstrapApplicationListener.java:208) at org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:104) at org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:70) at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165) at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:127) at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:76) at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:53) at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:345) at org.springframework.boot.SpringApplication.run(SpringApplication.java:308) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) at qdj.open.sdk.OpenSdkApplication.main(OpenSdkApplication.java:12) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49)
logback.xml 说URL不存在什么原因
![图片说明](https://img-ask.csdn.net/upload/201703/13/1489389912_179185.png) 什么问题啊 别的工程也这么配置都能起啊 请教 谢谢了
linux部署tomcat启动出问题,求大神们指教错在哪啊
2016-7-14 10:40:07 org.apache.catalina.core.AprLifecycleListener init 信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /home/admin/upay/jdk1.6.0_43/jre/lib/amd64/server:/home/admin/upay/jdk1.6.0_43/jre/lib/amd64:/home/admin/upay/jdk1.6.0_43/jre/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib 2016-7-14 10:40:08 org.apache.coyote.http11.Http11Protocol init 信息: Initializing Coyote HTTP/1.1 on http-9111 2016-7-14 10:40:08 org.apache.catalina.startup.Catalina load 信息: Initialization processed in 556 ms 2016-7-14 10:40:08 org.apache.catalina.core.StandardService start 信息: Starting service Catalina 2016-7-14 10:40:08 org.apache.catalina.core.StandardEngine start 信息: Starting Servlet Engine: Apache Tomcat/6.0.37 2016-7-14 10:40:08 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application directory CMUPayBankFront 2016-7-14 10:40:08 org.apache.catalina.loader.WebappClassLoader validateJarFile 信息: validateJarFile(/opt/mcb/bank_tomcat/webapps/CMUPayBankFront/WEB-INF/lib/servlet-api-2.5.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class 10:40:08,820 |-INFO in ch.qos.logback.classic.LoggerContext[CMUPayBankFront] - Could NOT find resource [logback.groovy] 10:40:08,820 |-INFO in ch.qos.logback.classic.LoggerContext[CMUPayBankFront] - Could NOT find resource [logback-test.xml] 10:40:08,821 |-INFO in ch.qos.logback.classic.LoggerContext[CMUPayBankFront] - Found resource [logback.xml] at [file:/opt/mcb/bank_tomcat/webapps/CMUPayBankFront/WEB-INF/classes/logback.xml] 10:40:08,976 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set 10:40:08,987 |-INFO in ch.qos.logback.classic.joran.action.ContextNameAction - Setting logger context name as [CMUPayBankFront] 10:40:08,988 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.rolling.RollingFileAppender] 10:40:08,999 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [FILE] 10:40:09,074 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy - No compression will be used 10:40:09,076 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy - Will use the pattern /opt/mcb/upaysys/logs/CMUPayBankFront/CMUPayBankFront_%d{yyyy-MM-dd}_%i.log for the active file 10:40:09,079 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@6477eb97 - The date pattern is 'yyyy-MM-dd' from file name pattern '/opt/mcb/upaysys/logs/CMUPayBankFront/CMUPayBankFront_%d{yyyy-MM-dd}_%i.log'. 10:40:09,079 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@6477eb97 - Roll-over at midnight. 10:40:09,083 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@6477eb97 - Setting initial period to Thu Jul 14 10:40:09 EDT 2016 10:40:09,086 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property 10:40:09,130 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - Active log file name: /opt/mcb/upaysys/logs/CMUPayBankFront/CMUPayBankFront_2016-07-14_0.log 10:40:09,130 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - File property is set to [null] 10:40:09,131 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.FileAppender] 10:40:09,131 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [OPERATE_FILE] 10:40:09,132 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@64:13 - no applicable action for [Encoding], current ElementPath is [[configuration][appender][Encoding]] 10:40:09,132 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property 10:40:09,133 |-INFO in ch.qos.logback.core.FileAppender[OPERATE_FILE] - File property is set to [/tlqnew/ljjkfile/sndfile//CMUPayBankFront.txt] 10:40:09,133 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [com.huateng.log.CustomMonitorAppender] 10:40:09,134 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [OPERATE_FILE_DAILY] 10:40:09,143 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy - No compression will be used 10:40:09,143 |-INFO in c.q.l.core.rolling.TimeBasedRollingPolicy - Will use the pattern /opt/mcb/upay/var/log/CMUPayBankFront_%i.log.%d{yyyyMMdd} for the active file 10:40:09,144 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@7d0c3a08 - The date pattern is 'yyyyMMdd' from file name pattern '/opt/mcb/upay/var/log/CMUPayBankFront_%i.log.%d{yyyyMMdd}'. 10:40:09,144 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@7d0c3a08 - Roll-over at midnight. 10:40:09,144 |-INFO in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@7d0c3a08 - Setting initial period to Thu Jul 14 10:40:09 EDT 2016 10:40:09,201 |-INFO in com.huateng.log.CustomMonitorAppender[OPERATE_FILE_DAILY] - Active log file name: /opt/mcb/upay/var/log/CMUPayBankFront_0.log.20160714 10:40:09,201 |-INFO in com.huateng.log.CustomMonitorAppender[OPERATE_FILE_DAILY] - File property is set to [null] 10:40:09,202 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [com.huateng.log.LogHandleImpl] to INFO 10:40:09,202 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting additivity of logger [com.huateng.log.LogHandleImpl] to false 10:40:09,202 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [OPERATE_FILE] to Logger[com.huateng.log.LogHandleImpl] 10:40:09,203 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [com.huateng.bank.logFormat.MessageLogger] to WARN 10:40:09,203 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting additivity of logger [com.huateng.bank.logFormat.MessageLogger] to false 10:40:09,203 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [OPERATE_FILE_DAILY] to Logger[com.huateng.bank.logFormat.MessageLogger] 10:40:09,203 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [com.huateng.bank.listener] to WARN 10:40:09,203 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting additivity of logger [com.huateng.bank.listener] to false 10:40:09,203 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [OPERATE_FILE_DAILY] to Logger[com.huateng.bank.listener] 10:40:09,203 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.apache.activemq.transport.failover] to WARN 10:40:09,203 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting additivity of logger [org.apache.activemq.transport.failover] to false 10:40:09,203 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [OPERATE_FILE_DAILY] to Logger[org.apache.activemq.transport.failover] 10:40:09,203 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to INFO 10:40:09,203 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [FILE] to Logger[ROOT] 10:40:09,203 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration. 10:40:09,215 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@2db6235b - Registering current configuration as safe fallback point 2016-7-14 10:40:10 org.apache.catalina.core.StandardContext start 严重: Error listenerStart 2016-7-14 10:40:10 org.apache.catalina.core.StandardContext start 严重: Context [/CMUPayBankFront] startup failed due to previous errors 2016-7-14 10:40:10 org.apache.coyote.http11.Http11Protocol start 信息: Starting Coyote HTTP/1.1 on http-9111 2016-7-14 10:40:10 org.apache.jk.common.ChannelSocket init 信息: JK: ajp13 listening on /0.0.0.0:9101 2016-7-14 10:40:10 org.apache.jk.server.JkMain start 信息: Jk running ID=0 time=0/59 config=null 2016-7-14 10:40:10 org.apache.catalina.startup.Catalina start 信息: Server startup in 2666 ms
springboot logback日志不能每天生成新的日志文件,全部日志在一个文件里?
如题:springboot+logback日志不能每天切割出新的日志文件,全部的日志在一个文件里。 logback配置如下,已经用了 SizeAndTimeBasedRollingPolicy 滚动策略,但是日志不会自动按天切分,只有在重启的时候才会重新读取当天日期,生成新的日志文件。 ``` <?xml version="1.0" encoding="utf-8" ?> <configuration> <appender name="consoleLog" class="ch.qos.logback.core.ConsoleAppender"> <layout class="ch.qos.logback.classic.PatternLayout"> <!-- <pattern> %d - %msg%n &lt;!&ndash; 控制台打印日志文件体 时间-信息 &ndash;&gt; </pattern>--> <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern> </layout> </appender> <!-- info日志 --> <appender name="fileInfoLog" class="ch.qos.logback.core.rolling.RollingFileAppender"> <!-- 过滤日志 --> <filter class="ch.qos.logback.classic.filter.LevelFilter"> <level>ERROR</level> <onMatch>DENY</onMatch> <!-- 如果命中就禁止这条日志 --> <onMismatch>ACCEPT</onMismatch> <!-- 如果没有命中就使用这条规则 --> </filter> <encoder> <!--格式化输出,%d:日期;%thread:线程名;%-5level:级别,从左显示5个字符宽度;%msg:日志消息;%n:换行符--> <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern> <!-- 设置字符集 --> <charset>UTF-8</charset> </encoder> <!-- 滚动策略 --> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <!-- 设置info日志路径 日志文件输出的文件名--> <fileNamePattern>../logs/%d{yyyy-MM}/api-info-%d{yyyy-MM-dd}.%i.log</fileNamePattern> <!--日志文件保留天数--> <MaxHistory>30</MaxHistory> <!--日志文件最大的大小--> <maxFileSize>5MB</maxFileSize> </rollingPolicy> </appender> <!-- error日志 --> <appender name="fileErrorLog" class="ch.qos.logback.core.rolling.RollingFileAppender"> <!-- 过滤日志 --> <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> <level>ERROR</level> </filter> <encoder> <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern> </encoder> <!-- 滚动策略 --> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <!-- 设置error日志路径 --> <fileNamePattern>../logs/%d{yyyy-MM}/api-error-%d{yyyy-MM-dd}.%i.log</fileNamePattern> <!--日志文件保留天数--> <MaxHistory>30</MaxHistory> <!--日志文件最大的大小--> <maxFileSize>5MB</maxFileSize> </rollingPolicy> </appender> <!-- api访问日志 --> <appender name="apiTopicLog" class="ch.qos.logback.core.rolling.RollingFileAppender"> <!-- 过滤日志 --> <filter class="ch.qos.logback.classic.filter.LevelFilter"> <level>INFO</level> <onMatch>ACCEPT</onMatch> <onMismatch>DENY</onMismatch> </filter> <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> <fileNamePattern>../logs/%d{yyyy-MM}/api_topic-%d{yyyy-MM-dd}.%i.log</fileNamePattern> <MaxHistory>30</MaxHistory> <!--日志文件最大的大小--> <maxFileSize>5MB</maxFileSize> </rollingPolicy> <encoder> <pattern>%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{50} - %msg%n</pattern> </encoder> </appender> <!-- 1. 输出SQL 到控制台和文件--> <logger name="org.hibernate.SQL" additivity="false"> <level value="DEBUG"/> <!-- <appender-ref ref="fileInfoLog"/>--> <appender-ref ref="consoleLog"/> </logger> <!-- 2. 输出SQL 的参数到控制台和文件--> <logger name="org.hibernate.type.descriptor.sql.BasicBinder" additivity="false" level="TRACE"> <level value="TRACE"/> <!-- <appender-ref ref="fileInfoLog"/>--> <appender-ref ref="consoleLog"/> </logger> <logger name="apiTopic" additivity="false"> <!-- 添加appender --> <appender-ref ref="fileInfoLog"/> <appender-ref ref="apiTopicLog"/> <appender-ref ref="consoleLog"/> </logger> <!-- 设置默认日志级别为INFO --> <root level="info"> <appender-ref ref="consoleLog"/> <appender-ref ref="fileInfoLog"/> <appender-ref ref="fileErrorLog"/> </root> </configuration> ```
springboot+logback每日生成日志文件
用springboot+logback配置了每日生成日志文件,以前用log4j没有问题,现在用logback每日生成日志文件,刚启动应用服务器时可以生成,以后每天并没有生成新的文件,而是继续写入原来的文件,有哪位兄弟知道原因了。 logback配置如下 <?xml version="1.0" encoding="UTF-8"?> <!-- Copyright 2010-2011 The myBatis Team Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <configuration debug="false"> <!--定义日志文件的存储地址 勿在 LogBack 的配置中使用相对路径--> <property name="LOG_HOME" value="@logback.log.file.path@"/> <!-- 控制台输出 --> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"> <!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符--> <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern> </encoder> </appender> <!-- 按照每天生成INFO日志文件 --> <appender name="WARN_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <!--日志文件输出的文件名--> <FileNamePattern>${LOG_HOME}/platform_logger_warn_%d{yyyy-MM-dd}.log</FileNamePattern> <!--日志文件保留天数--> <MaxHistory>10</MaxHistory> </rollingPolicy> <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"> <!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符--> <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern> </encoder> <filter class="ch.qos.logback.classic.filter.LevelFilter"> <level>ERROR</level> <onMatch>DENY</onMatch> <onMismatch>ACCEPT</onMismatch> </filter> <!--日志文件最大的大小--> <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> <MaxFileSize>10MB</MaxFileSize> </triggeringPolicy> </appender> <!-- 按照每天生成ERROR日志文件 --> <appender name="ERROR_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <!--日志文件输出的文件名--> <FileNamePattern>${LOG_HOME}/platform_logger_error_%d{yyyy-MM-dd}.log</FileNamePattern> <!--日志文件保留天数--> <MaxHistory>10</MaxHistory> </rollingPolicy> <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"> <!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符--> <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern> </encoder> <filter class="ch.qos.logback.classic.filter.LevelFilter"><!-- 只打印错误日志 --> <level>ERROR</level> <onMatch>ACCEPT</onMatch> <onMismatch>DENY</onMismatch> </filter> <!--日志文件最大的大小--> <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> <MaxFileSize>10MB</MaxFileSize> </triggeringPolicy> </appender> <!-- show parameters for hibernate sql 专为 Hibernate 定制 --> <!-- <logger name="org.hibernate.type.descriptor.sql.BasicBinder" level="TRACE" /> <logger name="org.hibernate.type.descriptor.sql.BasicExtractor" level="DEBUG" /> <logger name="org.hibernate.SQL" level="DEBUG" /> <logger name="org.hibernate.engine.QueryParameters" level="DEBUG" /> <logger name="org.hibernate.engine.query.HQLQueryPlan" level="DEBUG" /> --> <!-- 日志输出级别 --> <root level="@logback.log.root.level@"> <appender-ref ref="STDOUT"/> <appender-ref ref="WARN_FILE"/> <appender-ref ref="ERROR_FILE"/> </root> <!--日志异步到数据库 --> <!--<appender name="DB" class="ch.qos.logback.classic.db.DBAppender"> <connectionSource class="ch.qos.logback.core.db.DriverManagerConnectionSource"> <dataSource class="com.mchange.v2.c3p0.ComboPooledDataSource"> <driverClass>com.mysql.jdbc.Driver</driverClass> <url>jdbc:mysql://127.0.0.1:3306/databaseName</url> <user>root</user> <password>root</password> </dataSource> </connectionSource> </appender>--> </configuration>
springboot如何指定使用的logback文件?
1.使用springboot,maven项目;logback在resource下面,我能在启动的时候指定logback文件的位置吗?因为我不想使用默认的文件。 类似:-Dserver.port=10080 可以指定端口一样,我想:-Dxxx.path=logback.xml
logback access模块和jetty集成,启动jetty报错!!!
**官方资料:http://logback.qos.ch/access.html** **配置文件:** <Set name="handler"> <New id="Handlers" class="org.eclipse.jetty.server.handler.HandlerCollection"> <Set name="handlers"> <Array type="org.eclipse.jetty.server.Handler"> <Item> <New id="Contexts" class="org.eclipse.jetty.server.handler.ContextHandlerCollection"/> </Item> <Item> <New id="DefaultHandler" class="org.eclipse.jetty.server.handler.DefaultHandler"/> </Item> <!-- add a RequestLogHandler --> <Item> <New id="RequestLogHandler" class="org.eclipse.jetty.server.handler.RequestLogHandler"/> </Item> </Array> </Set> </New> </Set> <Ref id="RequestLogHandler"> <Set name="requestLog"> <New id="requestLogImpl" class="ch.qos.logback.access.jetty.RequestLogImpl"> <Set name="fileName">C:\jetty\resources\logback-access.xml</Set> </New> </Set> </Ref> <Call id="MBeanServer" class="java.lang.management.ManagementFactory" name="getPlatformMBeanServer"/> <!-- initialize the Jetty MBean container --> <Get id="Container" name="container"> <Call name="addEventListener"> <Arg> <New class="org.mortbay.management.MBeanContainer"> <Arg><Ref id="MBeanServer"/></Arg> <Set name="managementPort">8082</Set> <Call name="start" /> </New> </Arg> </Call> </Get> ** logback-access.xml文件** <configuration> <!-- always a good activate OnConsoleStatusListener --> <statusListener class="ch.qos.logback.core.status.OnConsoleStatusListener" /> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <encoder> <pattern>%h %l %u %user %date "%r" %s %b</pattern> </encoder> </appender> <appender-ref ref="STDOUT" /> </configuration> **启动jetty** C:\jetty>java -jar start.jar 2015-07-24 12:03:57.286:WARN:oejx.XmlConfiguration:Config error at <Set name="re questLog">|? <New id="requestLogImpl" class="ch.qos.logback.access.jetty.Requ estLogImpl"><Set name="fileName">C:\jetty\resources\logback-access.xml</Set></Ne w>|? </Set> java.lang.ClassNotFoundException: ch.qos.logback.access.jetty.Reque stLogImpl 2015-07-24 12:03:57.286:WARN:oejx.XmlConfiguration:Config error at <Ref id="Requ estLogHandler"><Set name="requestLog">|? <New id="requestLogImpl" class="ch.q os.logback.access.jetty.RequestLogImpl"><Set name="fileName">C:\jetty\resources\ logback-access.xml</Set></New>|? </Set></Ref> java.lang.ClassNotFoundException: ch.qos.logback.access.jetty.RequestLogImpl java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.eclipse.jetty.start.Main.invokeMain(Main.java:473) at org.eclipse.jetty.start.Main.start(Main.java:615) at org.eclipse.jetty.start.Main.main(Main.java:96) Caused by: java.lang.ClassNotFoundException: ch.qos.logback.access.jetty.Request LogImpl at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at org.eclipse.jetty.util.Loader.loadClass(Loader.java:100) at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.nodeClas s(XmlConfiguration.java:366) at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.newObj(X mlConfiguration.java:767) at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.itemValu e(XmlConfiguration.java:1141) at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.value(Xm lConfiguration.java:1044) at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.set(XmlC onfiguration.java:434) at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configur e(XmlConfiguration.java:396) at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.refObj(X mlConfiguration.java:847) at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configur e(XmlConfiguration.java:408) at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configur e(XmlConfiguration.java:355) at org.eclipse.jetty.xml.XmlConfiguration.configure(XmlConfiguration.jav a:296) at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:12 62) at java.security.AccessController.doPrivileged(Native Method) at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:119 7) ... 7 more Usage: java -jar start.jar [options] [properties] [configs] java -jar start.jar --help # for more information
关于?:符号的含义理解问题请指教
项目的logback.groovy配置文件有一行代码如下: def env = System.properties['spring.profiles.active'] ?: 'production' 啥意思啊搞不懂。。
java tomcat dubbo服务关闭失败
25-Dec-2019 13:10:35.326 INFO [main] org.apache.catalina.core.StandardServer.await A valid shutdown command was received via the shutdown port. Stopping the Server instance. 25-Dec-2019 13:10:35.328 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8050"] 25-Dec-2019 13:10:35.332 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["ajp-nio-8059"] 25-Dec-2019 13:10:35.333 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service [Catalina] 25-Dec-2019 13:10:35.384 WARNING [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [ROOT] appears to have started a thread named [DubboRegistryFailedRetryTimer-thread-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: sun.misc.Unsafe.park(Native Method) java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215) java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078) java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093) java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809) java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074) java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) 25-Dec-2019 13:10:45.373 INFO [localhost-startStop-1-SendThread(172.30.1.172:2181)] org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading Illegal access: this web application instance has been stopped already. Could not load [ch.qos.logback.core.status.WarnStatus]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access. java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load [ch.qos.logback.core.status.WarnStatus]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access. at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading(WebappClassLoaderBase.java:1328) at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1316) at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1175) at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1136) at ch.qos.logback.classic.LoggerContext.noAppenderDefinedWarning(LoggerContext.java:186) at ch.qos.logback.classic.Logger.callAppenders(Logger.java:264) at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:421) at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:383) at ch.qos.logback.classic.Logger.debug(Logger.java:482) at org.apache.zookeeper.ClientCnxn$SendThread.readResponse(ClientCnxn.java:742) at org.apache.zookeeper.ClientCnxnSocketNIO.doIO(ClientCnxnSocketNIO.java:94) at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:366) at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1141) 25-Dec-2019 13:10:45.377 INFO [localhost-startStop-1-SendThread(172.30.1.172:2181)] org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading Illegal access: this web application instance has been stopped already. Could not load [ch.qos.logback.classic.spi.ThrowableProxy]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access. java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load [ch.qos.logback.classic.spi.ThrowableProxy]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access. at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading(WebappClassLoaderBase.java:1328) at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1316) at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1175) at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1136) at ch.qos.logback.classic.spi.LoggingEvent.<init>(LoggingEvent.java:119) at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:419) at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:383) at ch.qos.logback.classic.Logger.warn(Logger.java:692) at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1162)
logback报错,请大家帮一下忙
```<?xml version="1.0" encoding="UTF-8"?> <configuration scan="true" scanPeriod="60 seconds" debug="false"> <!-- 定义参数常量 --> <!-- TRACE<DEBUG<INFO<WARN<ERROR --> <property name="log.level" value="debug" /> <property name="log.maxHistory" value="30" /> <property name="log.filePath" value="${catalina.base}/logs/webapps" /> <property name="log.pattern" value="%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg %n" /> <!--控制台设置 --> <appender name="consoleAppender" class="ch.qos.logback.core.ConsoleAppender"> <encoder> <pattern>${log.pattern}</pattern> </encoder> </appender> <!-- DEBUG --> <appender name="debugAppender" class="ch.qos.logback.core.rolling.RollingFileAppender"> <!-- 文件路径 --> <file>${log.filePath}/debug.log</file> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <!-- 文件名称 --> <fileNamePattern> ${log.filePath}/debug/debug.%d{yyyy-MM-dd}.log.gz </fileNamePattern> <!-- 文件最大保存历史数量 --> <maxHistory>${log.maxHistory}</maxHistory> </rollingPolicy> <encoder> <pattern>${log.pattern></pattern></encoder> <filter class="ch.qos.logback.classic.filter.LevelFilter"> <level>DEBUG</level> <onMatch>ACCEPT</onMatch> <onMismatch>DENY</onMismatch> </filter> </appender> <!--INFO --> <appender name="infoAppender" class="ch.qos.logback.core.rolling.RollingFileAppender"> <!-- 文件路径 --> <file>${log.filePath}/debug.log</file> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <!-- 文件名称 --> <fileNamePattern> ${log.filePath}/info/info.%d{yyyy-MM-dd}.log.gz </fileNamePattern> <!-- 文件最大保存历史数量 --> <maxHistory>${log.maxHistory}</maxHistory> </rollingPolicy> <encoder> <pattern>${log.pattern></pattern></encoder> <filter class="ch.qos.logback.classic.filter.LevelFilter"> <level>INFO</level> <onMatch>ACCEPT</onMatch> <onMismatch>DENY</onMismatch> </filter> </appender> <!--ERROR --> <appender name="errorAppender" class="ch.qos.logback.core.rolling.RollingFileAppender"> <!-- 文件路径 --> <file>${log.filePath}/debug.log</file> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <!-- 文件名称 --> <fileNamePattern> ${log.filePath}/error/error.%d{yyyy-MM-dd}.log.gz </fileNamePattern> <!-- 文件最大保存历史数量 --> <maxHistory>${log.maxHistory}</maxHistory> </rollingPolicy> <encoder> <pattern>${log.pattern></pattern></encoder> <filter class="ch.qos.logback.classic.filter.LevelFilter"> <level>ERROR</level> <onMatch>ACCEPT</onMatch> <onMismatch>DENY</onMismatch> </filter> </appender> <logger name="com.imooc.o2o" level="${log.level}" additivity="true" > <appender-ref ref="debugAppender"/> <appender-ref ref="infoAppender"/> <appender-ref ref="errorAppender"/> </logger> <root level ="info"> <appender-ref ref="consoleAppender"/> </root> </configuration> ``` ``` ``` package com.imooc.o2o.web.superadmin; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; import com.imooc.o2o.entity.Area; import com.imooc.o2o.service.AreaService; @Controller @RequestMapping("/superadmin") public class AreaController { Logger logger =LoggerFactory.getLogger(AreaController.class); @Autowired private AreaService areaService; @RequestMapping(value="/listarea",method = RequestMethod.GET) @ResponseBody private Map<String,Object> listArea(){ logger.info("===start==="); long startTime = System.currentTimeMillis(); Map<String,Object> modelMap=new HashMap<String,Object>(); List<Area> list = new ArrayList<Area>(); try { list = areaService.getAreaList(); modelMap.put("rows", list); modelMap.put("total", list.size()); }catch(Exception e) { e.printStackTrace(); modelMap.put("success",false); modelMap.put("errMsg",e.toString()); } logger.error("test error!"); long endTime = System.currentTimeMillis(); logger.debug("costTime:[{}ms]",endTime-startTime); logger.info("===end==="); return modelMap; } } 测试的时候出现这样的异常:Failed to instantiate [ch.qos.logback.classic.LoggerContext] Reported exception: java.lang.IllegalArgumentException: All tokens consumed but was expecting "}" at ch.qos.logback.core.subst.Parser.expectNotNull(Parser.java:143) at ch.qos.logback.core.subst.Parser.expectCurlyRight(Parser.java:148) at ch.qos.logback.core.subst.Parser.T(Parser.java:94) at ch.qos.logback.core.subst.Parser.E(Parser.java:51) at ch.qos.logback.core.subst.Parser.parse(Parser.java:47) at ch.qos.logback.core.subst.NodeToStringTransformer.tokenizeAndParseString(NodeToStringTransformer.java:55) at ch.qos.logback.core.subst.NodeToStringTransformer.substituteVariable(NodeToStringTransformer.java:46) at ch.qos.logback.core.util.OptionHelper.substVars(OptionHelper.java:112) at ch.qos.logback.core.joran.spi.InterpretationContext.subst(InterpretationContext.java:157) at ch.qos.logback.core.joran.action.NestedBasicPropertyIA.body(NestedBasicPropertyIA.java:90) at ch.qos.logback.core.joran.spi.Interpreter.callBodyAction(Interpreter.java:289) at ch.qos.logback.core.joran.spi.Interpreter.characters(Interpreter.java:172) at ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:57) at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:165) at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:152) at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:110) at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:53) at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:82) at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:157) at ch.qos.logback.classic.spi.LogbackServiceProvider.initializeLoggerContext(LogbackServiceProvider.java:49) at ch.qos.logback.classic.spi.LogbackServiceProvider.initialize(LogbackServiceProvider.java:40) at org.slf4j.LoggerFactory.bind(LoggerFactory.java:153) at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:141) at org.slf4j.LoggerFactory.getProvider(LoggerFactory.java:419) at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:405) 请问一下各位这是什么原因,本人小白,完全是照着视频里面打的
spring_boot的logback-spring.xml配置为什么 %d{yyyy-MM-dd} 不起作用
![图片说明](https://img-ask.csdn.net/upload/201811/02/1541125598_308663.jpg) 生成的文件是这个样子的 , 下图是我的配置: ![图片说明](https://img-ask.csdn.net/upload/201811/02/1541125769_361896.jpg) ![图片说明](https://img-ask.csdn.net/upload/201811/02/1541125789_804712.jpg) 试了各种办法也还是不行
spring logback 日志文件
同样的配置在window环境下部署到tomcat下可以生成log文件, 但是放到linux服务器上却怎么都生成不了,求大神帮忙解答,万分感谢! <configuration> <appender name="consoleAppender" class="ch.qos.logback.core.ConsoleAppender"> <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"> <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern> </encoder> </appender> <appender name="fileAppender" class="ch.qos.logback.core.rolling.RollingFileAppender"> <!--See also http://logback.qos.ch/manual/appenders.html#RollingFileAppender--> <file>${CATALINA_HOME}/logs/dedaotsp-pilot.log</file> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <!-- daily rollover Once any of the below condition met, it will change the file name as below and compressed it. --> <fileNamePattern>${CATALINA_HOME}/logs/dedaotsp-pilot.%d{yyyy-MM-dd}.%i.log.zip </fileNamePattern> <!-- keep 30 days' worth of history --> <maxHistory>30</maxHistory> <!-- or whenever the file size reaches 10MB --> <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> <maxFileSize>10MB</maxFileSize> </timeBasedFileNamingAndTriggeringPolicy> </rollingPolicy> <encoder> <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern> </encoder> </appender> <root level="debug"> <appender-ref ref="consoleAppender" /> <appender-ref ref="fileAppender" /> </root> </configuration>
spring配置logback出错
pom配置 ``` <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> <version>1.1.7</version> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-core</artifactId> <version>1.1.7</version> </dependency> <dependency> <groupId>org.logback-extensions</groupId> <artifactId>logback-ext-spring</artifactId> <version>0.1.4</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>jcl-over-slf4j</artifactId> <version>1.7.20</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>1.7.5</version> </dependency> ``` logback.xml配置 ``` <?xml version="1.0" encoding="UTF-8"?> <configuration> <!-- 尽量别用绝对路径,如果带参数不同容器路径解释可能不同,以下配置参数在pom.xml里 --> <property name="log.root.level" value="${log.root.level}" /> <!-- 日志级别 --> <property name="log.other.level" value="${log.other.level}" /> <!-- 其他日志级别 --> <property name="log.base" value="${log.base}" /> <!-- 日志路径,这里是相对路径,web项目eclipse下会输出到eclipse的安装目录下,如果部署到linux上的tomcat下,会输出到tomcat/bin目录 下 --> <property name="log.moduleName" value="${log.moduleName}" /> <!-- 模块名称, 影响日志配置名,日志文件名 --> <property name="log.max.size" value="100MB" /> <!-- 日志文件大小 --> <!--控制台输出 --> <appender name="stdout" class="ch.qos.logback.core.ConsoleAppender"> <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"> <Pattern>%date{yyyy-MM-dd HH:mm:ss.SSS} %-5level [%thread]%logger{56}.%method:%L -%msg%n</Pattern> </encoder> </appender> <!-- 日志文件输出 --> <appender name="file" class="ch.qos.logback.core.rolling.RollingFileAppender"> <File>${log.base}/${log.moduleName}.log</File><!-- 设置日志不超过${log.max.size}时的保存路径,注意如果 是web项目会保存到Tomcat的bin目录 下 --> <!-- 滚动记录文件,先将日志记录到指定文件,当符合某个条件时,将日志记录到其他文件。--> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> <FileNamePattern>${log.base}/archive/${log.moduleName}_all_%d{yyyy-MM-dd}.%i.log.zip </FileNamePattern> <!-- 当天的日志大小 超过${log.max.size}时,压缩日志并保存 --> <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> <maxFileSize>${log.max.size}</maxFileSize> </timeBasedFileNamingAndTriggeringPolicy> </rollingPolicy> <!-- 日志输出的文件的格式 --> <layout class="ch.qos.logback.classic.PatternLayout"> <pattern>%date{yyyy-MM-dd HH:mm:ss.SSS} %-5level [%thread]%logger{56}.%method:%L -%msg%n</pattern> </layout> </appender> <!-- 为某个包下的所有类的指定Appender 这里也可以指定类名称例如:com.aa.bb.ClassName --> <logger name="com.lin" additivity="false"> <level value="debug" /> <appender-ref ref="stdout" /> <appender-ref ref="file" /> </logger> <!-- root将级别为“DEBUG”及大于“DEBUG”的日志信息交给已经配置好的名为“Console”的appender处理,“Console”appender将信息打印到Console --> <root level="debug"> <appender-ref ref="stdout" /> <!-- 标识这个appender将会添加到这个logger --> <appender-ref ref="file" /> </root> </configuration> ``` 错误信息 ![图片说明](https://img-ask.csdn.net/upload/201708/11/1502429056_1370.jpg)
相见恨晚的超实用网站
搞学习 知乎:www.zhihu.com 简答题:http://www.jiandati.com/ 网易公开课:https://open.163.com/ted/ 网易云课堂:https://study.163.com/ 中国大学MOOC:www.icourse163.org 网易云课堂:study.163.com 哔哩哔哩弹幕网:www.bilibili.com 我要自学网:www.51zxw
花了20分钟,给女朋友们写了一个web版群聊程序
参考博客 [1]https://www.byteslounge.com/tutorials/java-ee-html5-websocket-example
爬虫福利二 之 妹子图网MM批量下载
爬虫福利一:27报网MM批量下载    点击 看了本文,相信大家对爬虫一定会产生强烈的兴趣,激励自己去学习爬虫,在这里提前祝:大家学有所成! 目标网站:妹子图网 环境:Python3.x 相关第三方模块:requests、beautifulsoup4 Re:各位在测试时只需要将代码里的变量 path 指定为你当前系统要保存的路径,使用 python xxx.py 或IDE运行即可。
字节跳动视频编解码面经
引言 本文主要是记录一下面试字节跳动的经历。 三四月份投了字节跳动的实习(图形图像岗位),然后hr打电话过来问了一下会不会opengl,c++,shador,当时只会一点c++,其他两个都不会,也就直接被拒了。 七月初内推了字节跳动的提前批,因为内推没有具体的岗位,hr又打电话问要不要考虑一下图形图像岗,我说实习投过这个岗位不合适,不会opengl和shador,然后hr就说秋招更看重基础。我当时
开源一个功能完整的SpringBoot项目框架
福利来了,给大家带来一个福利。 最近想了解一下有关Spring Boot的开源项目,看了很多开源的框架,大多是一些demo或者是一个未成形的项目,基本功能都不完整,尤其是用户权限和菜单方面几乎没有完整的。 想到我之前做的框架,里面通用模块有:用户模块,权限模块,菜单模块,功能模块也齐全了,每一个功能都是完整的。 打算把这个框架分享出来,供大家使用和学习。 为什么用框架? 框架可以学习整体
Java学习的正确打开方式
在博主认为,对于入门级学习java的最佳学习方法莫过于视频+博客+书籍+总结,前三者博主将淋漓尽致地挥毫于这篇博客文章中,至于总结在于个人,实际上越到后面你会发现学习的最好方式就是阅读参考官方文档其次就是国内的书籍,博客次之,这又是一个层次了,这里暂时不提后面再谈。博主将为各位入门java保驾护航,各位只管冲鸭!!!上天是公平的,只要不辜负时间,时间自然不会辜负你。 何谓学习?博主所理解的学习,它
程序员必须掌握的核心算法有哪些?
由于我之前一直强调数据结构以及算法学习的重要性,所以就有一些读者经常问我,数据结构与算法应该要学习到哪个程度呢?,说实话,这个问题我不知道要怎么回答你,主要取决于你想学习到哪些程度,不过针对这个问题,我稍微总结一下我学过的算法知识点,以及我觉得值得学习的算法。这些算法与数据结构的学习大多数是零散的,并没有一本把他们全部覆盖的书籍。下面是我觉得值得学习的一些算法以及数据结构,当然,我也会整理一些看过
Python——画一棵漂亮的樱花树(不同种樱花+玫瑰+圣诞树喔)
最近翻到一篇知乎,上面有不少用Python(大多是turtle库)绘制的树图,感觉很漂亮,我整理了一下,挑了一些我觉得不错的代码分享给大家(这些我都测试过,确实可以生成喔~) one 樱花树 动态生成樱花 效果图(这个是动态的): 实现代码 import turtle as T import random import time # 画樱花的躯干(60,t) def Tree(branch
深深的码丨Java HashMap 透析
HashMap 相关概念 HashTab、HashMap、TreeMap 均以键值对像是存储或操作数据元素。HashTab继承自Dictionary,HashMap、TreeMap继承自AbstractMap,三者均实现Map接口 **HashTab:**同步哈希表,不支持null键或值,因为同步导致性能影响,很少被使用 **HashMap:**应用较多的非同步哈希表,支持null键或值,是键值对...
大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了
大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、电子书搜索 对于大部分程序员...
linux系列之常用运维命令整理笔录
本博客记录工作中需要的linux运维命令,大学时候开始接触linux,会一些基本操作,可是都没有整理起来,加上是做开发,不做运维,有些命令忘记了,所以现在整理成博客,当然vi,文件操作等就不介绍了,慢慢积累一些其它拓展的命令,博客不定时更新 顺便拉下票,我在参加csdn博客之星竞选,欢迎投票支持,每个QQ或者微信每天都可以投5票,扫二维码即可,http://m234140.nofollow.ax.
Python 基础(一):入门必备知识
目录1 标识符2 关键字3 引号4 编码5 输入输出6 缩进7 多行8 注释9 数据类型10 运算符10.1 常用运算符10.2 运算符优先级 1 标识符 标识符是编程时使用的名字,用于给变量、函数、语句块等命名,Python 中标识符由字母、数字、下划线组成,不能以数字开头,区分大小写。 以下划线开头的标识符有特殊含义,单下划线开头的标识符,如:_xxx ,表示不能直接访问的类属性,需通过类提供
程序员接私活怎样防止做完了不给钱?
首先跟大家说明一点,我们做 IT 类的外包开发,是非标品开发,所以很有可能在开发过程中会有这样那样的需求修改,而这种需求修改很容易造成扯皮,进而影响到费用支付,甚至出现做完了项目收不到钱的情况。 那么,怎么保证自己的薪酬安全呢? 我们在开工前,一定要做好一些证据方面的准备(也就是“讨薪”的理论依据),这其中最重要的就是需求文档和验收标准。一定要让需求方提供这两个文档资料作为开发的基础。之后开发
网页实现一个简单的音乐播放器(大佬别看。(⊙﹏⊙))
今天闲着无事,就想写点东西。然后听了下歌,就打算写个播放器。 于是乎用h5 audio的加上js简单的播放器完工了。 欢迎 改进 留言。 演示地点跳到演示地点 html代码如下`&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;music&lt;/title&gt; &lt;meta charset="utf-8"&gt
Python十大装B语法
Python 是一种代表简单思想的语言,其语法相对简单,很容易上手。不过,如果就此小视 Python 语法的精妙和深邃,那就大错特错了。本文精心筛选了最能展现 Python 语法之精妙的十个知识点,并附上详细的实例代码。如能在实战中融会贯通、灵活使用,必将使代码更为精炼、高效,同时也会极大提升代码B格,使之看上去更老练,读起来更优雅。 1. for - else 什么?不是 if 和 else 才
数据库优化 - SQL优化
前面一篇文章从实例的角度进行数据库优化,通过配置一些参数让数据库性能达到最优。但是一些“不好”的SQL也会导致数据库查询变慢,影响业务流程。本文从SQL角度进行数据库优化,提升SQL运行效率。 判断问题SQL 判断SQL是否有问题时可以通过两个表象进行判断: 系统级别表象 CPU消耗严重 IO等待严重 页面响应时间过长
2019年11月中国大陆编程语言排行榜
2019年11月2日,我统计了某招聘网站,获得有效程序员招聘数据9万条。针对招聘信息,提取编程语言关键字,并统计如下: 编程语言比例 rank pl_ percentage 1 java 33.62% 2 c/c++ 16.42% 3 c_sharp 12.82% 4 javascript 12.31% 5 python 7.93% 6 go 7.25% 7
通俗易懂地给女朋友讲:线程池的内部原理
餐厅的约会 餐盘在灯光的照耀下格外晶莹洁白,女朋友拿起红酒杯轻轻地抿了一小口,对我说:“经常听你说线程池,到底线程池到底是个什么原理?”我楞了一下,心里想女朋友今天是怎么了,怎么突然问出这么专业的问题,但做为一个专业人士在女朋友面前也不能露怯啊,想了一下便说:“我先给你讲讲我前同事老王的故事吧!” 大龄程序员老王 老王是一个已经北漂十多年的程序员,岁数大了,加班加不动了,升迁也无望,于是拿着手里
经典算法(5)杨辉三角
杨辉三角 是经典算法,这篇博客对它的算法思想进行了讲解,并有完整的代码实现。
腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹?
昨天,有网友私信我,说去阿里面试,彻底的被打击到了。问了为什么网上大量使用ThreadLocal的源码都会加上private static?他被难住了,因为他从来都没有考虑过这个问题。无独有偶,今天笔者又发现有网友吐槽了一道腾讯的面试题,我们一起来看看。 腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹? 在互联网职场论坛,一名程序员发帖求助到。二面腾讯,其中一个算法题:64匹
面试官:你连RESTful都不知道我怎么敢要你?
面试官:了解RESTful吗? 我:听说过。 面试官:那什么是RESTful? 我:就是用起来很规范,挺好的 面试官:是RESTful挺好的,还是自我感觉挺好的 我:都挺好的。 面试官:… 把门关上。 我:… 要干嘛?先关上再说。 面试官:我说出去把门关上。 我:what ?,夺门而去 文章目录01 前言02 RESTful的来源03 RESTful6大原则1. C-S架构2. 无状态3.统一的接
JDK12 Collectors.teeing 你真的需要了解一下
前言 在 Java 12 里面有个非常好用但在官方 JEP 没有公布的功能,因为它只是 Collector 中的一个小改动,它的作用是 merge 两个 collector 的结果,这句话显得很抽象,老规矩,我们先来看个图(这真是一个不和谐的图????): 管道改造经常会用这个小东西,通常我们叫它「三通」,它的主要作用就是将 downstream1 和 downstre...
为啥国人偏爱Mybatis,而老外喜欢Hibernate/JPA呢?
关于SQL和ORM的争论,永远都不会终止,我也一直在思考这个问题。昨天又跟群里的小伙伴进行了一番讨论,感触还是有一些,于是就有了今天这篇文。 声明:本文不会下关于Mybatis和JPA两个持久层框架哪个更好这样的结论。只是摆事实,讲道理,所以,请各位看官勿喷。 一、事件起因 关于Mybatis和JPA孰优孰劣的问题,争论已经很多年了。一直也没有结论,毕竟每个人的喜好和习惯是大不相同的。我也看
项目中的if else太多了,该怎么重构?
介绍 最近跟着公司的大佬开发了一款IM系统,类似QQ和微信哈,就是聊天软件。我们有一部分业务逻辑是这样的 if (msgType = "文本") { // dosomething } else if(msgType = "图片") { // doshomething } else if(msgType = "视频") { // doshomething } else { // doshom...
致 Python 初学者
欢迎来到“Python进阶”专栏!来到这里的每一位同学,应该大致上学习了很多 Python 的基础知识,正在努力成长的过程中。在此期间,一定遇到了很多的困惑,对未来的学习方向感到迷茫。我非常理解你们所面临的处境。我从2007年开始接触 python 这门编程语言,从2009年开始单一使用 python 应对所有的开发工作,直至今天。回顾自己的学习过程,也曾经遇到过无数的困难,也曾经迷茫过、困惑过。开办这个专栏,正是为了帮助像我当年一样困惑的 Python 初学者走出困境、快速成长。希望我的经验能真正帮到你
“狗屁不通文章生成器”登顶GitHub热榜,分分钟写出万字形式主义大作
一、垃圾文字生成器介绍 最近在浏览GitHub的时候,发现了这样一个骨骼清奇的雷人项目,而且热度还特别高。 项目中文名:狗屁不通文章生成器 项目英文名:BullshitGenerator 根据作者的介绍,他是偶尔需要一些中文文字用于GUI开发时测试文本渲染,因此开发了这个废话生成器。但由于生成的废话实在是太过富于哲理,所以最近已经被小伙伴们给玩坏了。 他的文风可能是这样的: 你发现,...
程序员:我终于知道post和get的区别
是一个老生常谈的话题,然而随着不断的学习,对于以前的认识有很多误区,所以还是需要不断地总结的,学而时习之,不亦说乎
《程序人生》系列-这个程序员只用了20行代码就拿了冠军
你知道的越多,你不知道的越多 点赞再看,养成习惯GitHub上已经开源https://github.com/JavaFamily,有一线大厂面试点脑图,欢迎Star和完善 前言 这一期不算《吊打面试官》系列的,所有没前言我直接开始。 絮叨 本来应该是没有这期的,看过我上期的小伙伴应该是知道的嘛,双十一比较忙嘛,要值班又要去帮忙拍摄年会的视频素材,还得搞个程序员一天的Vlog,还要写BU...
加快推动区块链技术和产业创新发展,2019可信区块链峰会在京召开
11月8日,由中国信息通信研究院、中国通信标准化协会、中国互联网协会、可信区块链推进计划联合主办,科技行者协办的2019可信区块链峰会将在北京悠唐皇冠假日酒店开幕。   区块链技术被认为是继蒸汽机、电力、互联网之后,下一代颠覆性的核心技术。如果说蒸汽机释放了人类的生产力,电力解决了人类基本的生活需求,互联网彻底改变了信息传递的方式,区块链作为构造信任的技术有重要的价值。   1...
程序员把地府后台管理系统做出来了,还有3.0版本!12月7号最新消息:已在开发中有github地址
第一幕:缘起 听说阎王爷要做个生死簿后台管理系统,我们派去了一个程序员…… 996程序员做的梦: 第一场:团队招募 为了应对地府管理危机,阎王打算找“人”开发一套地府后台管理系统,于是就在地府总经办群中发了项目需求。 话说还是中国电信的信号好,地府都是满格,哈哈!!! 经常会有外行朋友问:看某网站做的不错,功能也简单,你帮忙做一下? 而这次,面对这样的需求,这个程序员...
相关热词 如何提升c#开发能力 矩阵乘法c# c#调用谷歌浏览器 c# 去空格去转义符 c#用户登录窗体代码 c# 流 c# linux 可视化 c# mvc 返回图片 c# 像素空间 c# 日期 最后一天
立即提问