net.i2p.util.LogManager.getLog()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(5.8k)|赞(0)|评价(0)|浏览(98)

本文整理了Java中net.i2p.util.LogManager.getLog()方法的一些代码示例,展示了LogManager.getLog()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。LogManager.getLog()方法的具体详情如下:
包路径:net.i2p.util.LogManager
类名称:LogManager
方法名:getLog

LogManager.getLog介绍

[英]now used by ConfigLogingHelper
[中]现在由ConfigLogingHelper使用

代码示例

代码示例来源:origin: i2p/i2p.i2p

public FloodfillMonitorJob(RouterContext context, FloodfillNetworkDatabaseFacade facade) {
  super(context);
  _facade = facade;
  _log = context.logManager().getLog(FloodfillMonitorJob.class);
}

代码示例来源:origin: i2p/i2p.i2p

public HandlerImpl(I2PAppContext context, int type) {
  _context = context;
  _type = type;
  _log = context.logManager().getLog(getClass());
}

代码示例来源:origin: i2p/i2p.i2p

public InternalTrayManager(RouterContext ctx, Main main, boolean useSwing) {
  super(ctx, main, useSwing);
  _context = ctx;
  log = ctx.logManager().getLog(InternalTrayManager.class);
}

代码示例来源:origin: i2p/i2p.i2p

public UpdateRunner(I2PAppContext ctx, UpdateManager umgr, SnarkManager smgr,
          UpdateType type, List<URI> uris, String newVersion) { 
  _context = ctx;
  _log = ctx.logManager().getLog(getClass());
  _umgr = umgr;
  _smgr = smgr;
  _type = type;
  _urls = uris;
  _newVersion = newVersion;
}

代码示例来源:origin: i2p/i2p.i2p

/**
 *  @param receiver non-null
 */
public GarlicMessageReceiver(RouterContext context, CloveReceiver receiver, Hash clientDestination) {
  _context = context;
  _log = context.logManager().getLog(GarlicMessageReceiver.class);
  _clientDestination = clientDestination;
  _receiver = receiver;
  //_log.error("New GMR dest = " + clientDestination);
  // all createRateStat in OCMOSJ.init()
}

代码示例来源:origin: i2p/i2p.i2p

public RefreshRoutersJob(RouterContext ctx, FloodfillNetworkDatabaseFacade facade) {
  super(ctx);
  _log = ctx.logManager().getLog(RefreshRoutersJob.class);
  _facade = facade;
}

代码示例来源:origin: i2p/i2p.i2p

public ClientManagerFacadeImpl(RouterContext context) {
  _context = context;
  _log = _context.logManager().getLog(ClientManagerFacadeImpl.class);
  //_log.debug("Client manager facade created");
}

代码示例来源:origin: i2p/i2p.i2p

public RouterWatchdog(RouterContext ctx) {
  _context = ctx;
  _log = ctx.logManager().getLog(RouterWatchdog.class);
  _isRunning = true;
}

代码示例来源:origin: i2p/i2p.i2p

Reseeder(RouterContext ctx, ReseedChecker rc) {
  _context = ctx;
  _log = ctx.logManager().getLog(Reseeder.class);
  _checker = rc;
}

代码示例来源:origin: i2p/i2p.i2p

/**
 *  Router MUST call startup()
 */
public Blocklist(RouterContext context) {
  _context = context;
  _log = context.logManager().getLog(Blocklist.class);
  _blocklistFeedFile = new File(context.getConfigDir(), BLOCKLIST_FEED_FILE);
}

代码示例来源:origin: i2p/i2p.i2p

/** @since 0.9.7 */
  private static Log getLog() {
    return I2PAppContext.getGlobalContext().logManager().getLog(I2PSocketManagerFactory.class);
  }
}

代码示例来源:origin: i2p/i2p.i2p

DHTTracker(I2PAppContext ctx) {
  _context = ctx;
  _torrents = new Torrents();
  _expireTime = MAX_EXPIRE_TIME;
  _log = _context.logManager().getLog(DHTTracker.class);
}

代码示例来源:origin: i2p/i2p.i2p

public HandleDatabaseLookupMessageJob(RouterContext ctx, DatabaseLookupMessage receivedMessage, RouterIdentity from, Hash fromHash) {
  super(ctx);
  _log = getContext().logManager().getLog(HandleDatabaseLookupMessageJob.class);
  _message = receivedMessage;
}

代码示例来源:origin: i2p/i2p.i2p

public TunnelHistory(RouterContext context, String statGroup) {
  _context = context;
  _log = context.logManager().getLog(TunnelHistory.class);
  _statGroup = statGroup;
  createRates(statGroup);
}

代码示例来源:origin: i2p/i2p.i2p

public DHTNodes(I2PAppContext ctx, NID me) {
  _context = ctx;
  _expireTime = MAX_EXPIRE_TIME;
  _log = _context.logManager().getLog(DHTNodes.class);
  _nodeMap = new ConcurrentHashMap<NID, NodeInfo>();
  _kad = new KBucketSet<NID>(ctx, me, KAD_K, KAD_B, new KBTrimmer(ctx, KAD_K));
}

代码示例来源:origin: i2p/i2p.i2p

public ClientMessagePool(RouterContext context) {
  _context = context;
  _log = _context.logManager().getLog(ClientMessagePool.class);
  _cache = new OutboundCache(_context);
  OutboundClientMessageOneShotJob.init(_context);
}

代码示例来源:origin: i2p/i2p.i2p

public I2CPMessageProducer(I2PAppContext context) {
  _context = context;
  _log = context.logManager().getLog(I2CPMessageProducer.class);
  _lock = new ReentrantLock(true);
  context.statManager().createRateStat("client.sendThrottled", "Times waited for bandwidth", "ClientMessages", new long[] { 60*1000 });
  context.statManager().createRateStat("client.sendDropped", "Length of msg dropped waiting for bandwidth", "ClientMessages", new long[] { 60*1000 });
}

代码示例来源:origin: i2p/i2p.i2p

public Banlist(RouterContext context) {
  _context = context;
  _log = context.logManager().getLog(Banlist.class);
  _entries = new ConcurrentHashMap<Hash, Entry>(16);
  _context.jobQueue().addJob(new Cleanup(_context));
  // i2pd bug?
  banlistRouterForever(Hash.FAKE_HASH, "Invalid Hash");
}

代码示例来源:origin: i2p/i2p.i2p

/**
 *  @param enforceAuth set false for in-JVM, true for socket access
 */
public ClientMessageEventListener(RouterContext context, ClientConnectionRunner runner, boolean enforceAuth) {
  _context = context;
  _log = _context.logManager().getLog(ClientMessageEventListener.class);
  _runner = runner;
  _enforceAuth = enforceAuth;
  if ((!_enforceAuth) || !_context.getBooleanProperty(PROP_AUTH))
    _authorized = true;
  _context.statManager().createRateStat("client.distributeTime", "How long it took to inject the client message into the router", "ClientMessages", new long[] { 60*1000, 10*60*1000, 60*60*1000 });
}

代码示例来源:origin: i2p/i2p.i2p

/** Creates a new instance of PeerTestJob */
public PeerTestJob(RouterContext context) {
  super(context);
  _log = context.logManager().getLog(PeerTestJob.class);
  _keepTesting = false;
  getContext().statManager().createRateStat("peer.testOK", "How long a successful test takes", "Peers", new long[] { 60*1000, 10*60*1000 });
  getContext().statManager().createRateStat("peer.testTooSlow", "How long a too-slow (yet successful) test takes", "Peers", new long[] { 60*1000, 10*60*1000 });
  getContext().statManager().createRateStat("peer.testTimeout", "How often a test times out without a reply", "Peers", new long[] { 60*1000, 10*60*1000 });
}

相关文章