当前位置: 首页 > news >正文

如何在头条上做网站推广十大跨境电商排名

如何在头条上做网站推广,十大跨境电商排名,建立网站服务器,策划方案网站有时候#xff0c;我们需要确定某些文件是否有变化而做出一些对应的动作#xff0c;例如#xff0c;曾经开发的一款服务器中#xff0c;由于模块比较多#xff0c;在运行期间有时候需要单独的输出某个模块日志#xff0c;但又不可能总是开着日志。log4j中已经实现了可以动…有时候我们需要确定某些文件是否有变化而做出一些对应的动作例如曾经开发的一款服务器中由于模块比较多在运行期间有时候需要单独的输出某个模块日志但又不可能总是开着日志。log4j中已经实现了可以动态监控日志级别日志监视器PropertyConfigurator.configureAndWatch(properties);上面的properties是日志配置文件例如常用的 log4j.properties ,log4j.xml。但是这是系统级别的然后看了一下源代码/** Licensed to the Apache Software Foundation (ASF) under one or more* contributor license agreements. See the NOTICE file distributed with* this work for additional information regarding copyright ownership.* The ASF licenses this file to You 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.*/// Contributors: Mathias Bogaertpackage org.apache.log4j.helpers;import java.io.File;/*** Check every now and then that a certain file has not changed. If it has, then* call the {link #doOnChange} method.** author Ceki Gülcü* since version 0.9.1*/public abstract class FileWatchdog extends Thread {/*** The default delay between every file modification check, set to 60* seconds.*/static final public long DEFAULT_DELAY 60000;/*** The name of the file to observe for changes.*/protected String filename;/*** The delay to observe between every check. By default set* {link #DEFAULT_DELAY}.*/protected long delay DEFAULT_DELAY;File file;long lastModif 0;boolean warnedAlready false;boolean interrupted false;protected FileWatchdog(String filename) {super(FileWatchdog);this.filename filename;file new File(filename);setDaemon(true);checkAndConfigure();}/*** Set the delay to observe between each check of the file changes.*/public void setDelay(long delay) {this.delay delay;}abstract protected void doOnChange();protected void checkAndConfigure() {boolean fileExists;try {fileExists file.exists();} catch (SecurityException e) {LogLog.warn(Was not allowed to read check file existance, file:[ filename ].);interrupted true; // there is no point in continuingreturn;}if (fileExists) {long l file.lastModified(); // this can also throw a// SecurityExceptionif (l lastModif) { // however, if we reached this point thislastModif l; // is very unlikely.doOnChange();warnedAlready false;}} else {if (!warnedAlready) {LogLog.debug([ filename ] does not exist.);warnedAlready true;}}}public void run() {while (!interrupted) {try {Thread.sleep(delay);} catch (InterruptedException e) {// no interruption expected}checkAndConfigure();}}}这是一个抽象类子类只要实现最关心的文件内容有变化的回调方法 doOnChange 就OK。因此在一个工程中如果想实现模块级别的日志控制则我们可以附件一个配置文件在这个配置文件中指定模块的日志级别 在log4j中指定总的级别然后在应用中实现文件内容监控则可以做到动态切换实现细粒度的控制。
http://wiki.neutronadmin.com/news/19647/

相关文章:

  • 手机上自己如何做网站免费帮助建站
  • 网站建设服务网站建设网页编辑表格
  • 精通网站建设 pdf有没有专业做挂的网站
  • 池州网站开发公司招聘wordpress如何修改php
  • 保定网站建设优化芜湖网站备案咨询电话
  • 莲花网站重庆网站建设模板制作
  • 电子商务网站的建设与流程洛阳seo
  • 培训网站平台如何推广广州番禺房价最新楼盘价格
  • 给网站做企业所得税优惠政策
  • 做个网站需要什么设备wordpress 免费采集插件
  • 四川省住房和城乡建设局网站首页网页开发流程
  • 建设部网站核对编号你的网站尚未备案 根据
  • 怎么重新网站做301网站开发具体步骤
  • 物流案例 网站深圳市测绘建设局网站
  • 如何申请网站优化工作广州网站备案
  • 做网站的费用如何写分录非经营备案网站能贴放广告么
  • 学仿网站360建筑网怎么找回密码
  • jsp网站开发与数据库连接网站名称怎么变更
  • 上海做网站的月薪网站seo诊断湖南岚鸿
  • 学做家常菜的网站ps网页模板
  • vue框架做的网站软件商店打不开怎么办
  • 成都成仁路网站建设仁怀那里可以做网站
  • 外国黄冈网站推广平台专业沈阳网站制作
  • 关键词带淘宝的网站不收录万和城官方网站
  • 兼职 做网站中国空间站机械臂
  • wordpress 站点描述微信服务号绑定网站
  • discuz怎么做网站地图全屏网站模板
  • 做外文翻译的网站高端网站建设系统
  • 制作外贸网站模板下载专做国际时事评论网站
  • 网站域名注册机制个人建购物网站 备案