本文整理了Java中org.ow2.util.log.Log.info()
方法的一些代码示例,展示了Log.info()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Log.info()
方法的具体详情如下:
包路径:org.ow2.util.log.Log
类名称:Log
方法名:info
[英]Log a message with info log level.
[中]使用信息日志级别记录消息。
代码示例来源:origin: org.ow2.easybeans/easybeans-component-event
/**
* Start method.<br/> This method is called after the init method.
* @throws EZBComponentException if the start has failed.
*/
public synchronized void start() throws EZBComponentException {
logger.info("started.");
}
代码示例来源:origin: org.ow2.jasmine/agent.common
/**
* Print the system configuration
*/
public void printSystemConfiguration() {
logger.info("OS Name : {0}", osName);
logger.info("OS Architecture : {0}", osArchitecture);
logger.info("OS Version : {0}", osVersion);
logger.info("Number of processors : {0}", nbProc);
logger.info("Distribution : {0}", distribution);
logger.info("IP Address : {0}", ip);
logger.info("Hostname : {0}", hostname);
logger.info("Logical Name : {0}", instanceName);
logger.info("Network interfaces :");
for (Interface n : networkInterfaces) {
logger.info("\t Interface {0}", n.getName());
logger.info("\t\t IP Address : {0}", n.getIpAddress());
logger.info("\t\t MAC Address : {0}", n.getMacAddress());
}
}
代码示例来源:origin: org.ow2.jonas/jonas-mbeans
/**
* Dump the given bytes to a local file and then return the path to this file.
* @param fileName the name of the file to distribute
* @param fileContent the content of the given file
* @return the path of the distributed file
*/
public String distribute(final String fileName, final byte[] fileContent) throws Exception {
logger.info("Distribute file to the local filesystem with the name = ''{0}''.", fileName);
String path = sendFile(fileContent, fileName, true);
return path;
}
代码示例来源:origin: org.ow2.jonas.osgi/monolog
/**
* Add an extension to Monolog
* @param logInfoProvider
*/
public void addExtension(final LogInfo logInfoProvider, ServiceReference ref) {
Character pattern = (Character) ref.getProperty("pattern");
try {
Monolog.monologFactory.addLogInfo(pattern, logInfoProvider);
} catch (Exception e) {
}
logger.info("Extension ''{0}'' was added by ''{1}'' to Monolog", pattern, logInfoProvider.getClass().getName());
}
代码示例来源:origin: org.ow2.jonas.osgi/monolog
/**
* Remove and extension from Monolog
*/
public void removeExtension(ServiceReference ref) {
Character pattern = (Character) ref.getProperty("pattern");
Monolog.monologFactory.removeLogInfo(pattern);
logger.info("Extension ''{0}'' was removerd from Monolog.", pattern);
}
代码示例来源:origin: org.ow2.jasmine.probe/jprobe-manager
@Unbind(aggregate = true, optional = true)
protected void unbindAggregateService(JasmineAggregateService jas, ServiceReference sr) {
// get aggregate function type
String type = (String) sr.getProperty("aggregate.type");
if (type == null) {
logger.warn("Undeploying a service providing implementation for an aggregate JASMINe Probe Indicator that has not defined 'indicator.type' property");
return;
}
if (aggregateservices.containsKey(type)) {
aggregateservices.remove(type);
logger.info("A service providing implementation for an aggregate JASMINe Probe Indicator with {0} function undeployed from JasmineProbe", type);
logger.info("{0} JasmineAggregateService unbound into JasmineProbe.", type);
}
}
代码示例来源:origin: org.ow2.cmi/cmi-admin
/**
* Initialize the MBeanServer.
* Use an already existing server when CMI is embedded, else create a new MBean server.
* @throws CMIMBeanConfigException if CMI is embedded but no MBean server is available
*/
private static void initMBeanServer() throws CMIMBeanConfigException {
// Gets the first available MBean Server
List<?> mbeanServers = MBeanServerFactory.findMBeanServer(agentId);
if (mbeanServers.size() == 0) {
logger.info("Creating a new MBeanServer...");
// Needs to create an MBean server
mbeanServer = MBeanServerFactory.createMBeanServer(mbeanDomainName);
} else {
if (mbeanServers.size() > 1) {
logger.info("Many MBeanServer available: taking the first of the list");
}
mbeanServer = (MBeanServer) mbeanServers.get(0);
}
}
代码示例来源:origin: org.ow2.jonas.camel/camel-service
/**
* Initializes the service.
*/
public void start() {
this.camelContexts = new HashMap<String, ICamelWrapper>();
this.logger.info("Camel service started");
if (this.bundleContext != null) {
CamelContextServiceFactory camelContextServiceFactory = new CamelContextServiceFactory();
camelContextServiceFactory.setCamelService(this);
this.camelContextFactoryServiceRegistration = this.bundleContext.registerService(CamelContext.class.getName(),
camelContextServiceFactory, null);
this.logger.info("Camel context factory service started");
}
}
代码示例来源:origin: org.ow2.cmi/cmi-core-client
@Override
public boolean starting() {
// Start the daemon to update the cluster view
clientClusterViewUpdater.start();
while(!started) {
try {
wait();
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
}
if(clusterViewProviderAvailable) {
setState(State.AVAILABLE);
} else {
setState(State.STARTED);
}
LOGGER.info("The CMI client was successfully started.");
return clusterViewProviderAvailable;
}
代码示例来源:origin: org.ow2.jonas/jonas-mbeans
/**
* Log state information.
*/
private void info(final String message) {
logger.info("JOnAS AS v{0} named ''{1}'' {2}", getServerVersion(), getServerName(), message);
}
代码示例来源:origin: org.ow2.jonas/jonas-mbeans
/**
* Log a JVM thread stack dump in JOnAS log file (level : info).
*/
public void logThreadStackDump() {
try {
String stackDump = getThreadStackDump();
logger.info(stackDump);
} catch (Exception estack) {
logger.warn("Error getting thread stack dump", estack);
}
}
代码示例来源:origin: org.ow2.jasmine.probe/jprobe-manager
@Bind(aggregate = true, optional = true)
protected void bindAggregateService(JasmineAggregateService jas, ServiceReference sr) {
// get aggregate function type
String type = (String) sr.getProperty("aggregate.type");
if (type == null) {
logger.warn("A service providing specific implementation for an aggregate JASMINe Probe Indicator must define 'aggregate.type' property to specify its aggregate function");
return;
}
JasmineAggregateService old = aggregateservices.get(type);
if (old != null) {
// A service for aggregate function already exists, use it if its not un-deployed.
// Another approach could be to replace the old function by a new one.
logger.warn("A service providing implementation for an aggregate JASMINe Probe Indicator already defined for " + type + " function. Please check deployment plan and undeploy old service !");
return;
}
aggregateservices.put(type, jas);
logger.info("A service providing implementation for an aggregate JASMINe Probe Indicator with {0} function deployed to JasmineProbe", type);
}
代码示例来源:origin: org.ow2.easybeans/easybeans-component-event
/**
* Stop method.<br/> This method is called when component needs to be
* stopped.
* @throws EZBComponentException if the stop is failing.
*/
public synchronized void stop() throws EZBComponentException {
for (IEventListener listener : this.listeners) {
this.service.unregisterListener(listener);
}
for (EZBJ2EEManagedObject object : this.objects) {
this.service.unregisterDispatcher(object.getJ2EEManagedObjectId());
}
this.listeners.clear();
this.objects.clear();
logger.info("stopped.");
}
代码示例来源:origin: org.ow2.jasmine.monitoring/eventswitch-db-ejb
/**
* Remove a timer corresponding to a purge task.
* @param bean
*/
private void removeTask(final JasmineEventPurgeTaskEB bean) {
Collection timers = timerService.getTimers();
for (Iterator<Timer> it = timers.iterator(); it.hasNext();) {
Timer timer = it.next();
if (Long.parseLong(timer.getInfo().toString()) == bean.getId()) {
timer.cancel();
}
}
bean.setStarted(false);
logger.info("[DataManagement] Purge Task removed : " + bean.getId());
}
代码示例来源:origin: org.ow2.jasmine.probe/jprobe-manager
@Bind(aggregate = true, optional = true)
protected void bindCollectorService(JasmineCollectorService jcs, ServiceReference sr) {
String type = (String) sr.getProperty("indicator.type");
if (type == null) {
logger.warn("A service providing implementation for a JASMINe Probe Indicator type must use 'indicator.type' property to specify that type");
return;
}
String mess = "A service for " + type + " indicator";
JasmineCollectorService old = collectorservices.get(type);
if (old != null) {
logger.warn(mess + " already deployed");
return;
}
collectorservices.put(type, jcs);
logger.info(mess + " deployed to JASMINe Probe");
// check if some probes can be started
startWaitingProbes();
}
代码示例来源:origin: org.ow2.jonas/jonas-endpoint-collector-core
/**
* {@inheritDoc}
*/
@Override
protected void doStop() throws ServiceException {
try {
this.mBeanServer.removeNotificationListener(MBeanServerDelegate.DELEGATE_NAME, this);
} catch (InstanceNotFoundException e) {
logger.error("Cannot remove notification listener on " + MBeanServerDelegate.DELEGATE_NAME, e);
} catch (ListenerNotFoundException e) {
logger.error("Cannot remove notification listener on " + MBeanServerDelegate.DELEGATE_NAME, e);
}
logger.info("Endpoint Collector stopped.");
}
代码示例来源:origin: org.ow2.easybeans/easybeans-component-jotm
/**
* Stop method.<br/>
* This method is called when component needs to be stopped.
* @throws EZBComponentException if the stop is failing.
*/
public void stop() throws EZBComponentException {
// Unbind user transaction object
try {
new InitialContext().unbind(JNDI_NAME);
} catch (NamingException e) {
throw new EZBComponentException("Cannot unbind user transaction", e);
}
// Stop timer
TimerManager.stop(true);
// Stop JOTM
this.jotm.stop();
logger.info("JOTM Component stopped");
}
代码示例来源:origin: org.ow2.jonas/jonas-mbeans
public void setStarting() {
serverState = J2EEServerState.STARTING;
Notification notif = new Notification(serverState.getName(), getObjectName(), sequenceNumber++);
sendNotification(notif);
logger.info(jvmInfos());
info("STARTING");
}
代码示例来源:origin: org.ow2.jasmine.monitoring/eventswitch-db-ejb
/**
* Create a new timer corresponding to a purge task. This task can be periodic.
* @param bean
*/
private void createTask(final JasmineEventPurgeTaskEB bean) {
// create a new one
if (bean.getExecutionInterval() == 0) {
timerService.createTimer(bean.getExecutionStartDate(), bean.getId());
logger.info("[DataManagement] Purge Task configured, execution : " + bean.getExecutionStartDate());
} else {
timerService.createTimer(bean.getExecutionStartDate(), bean.getExecutionInterval(), bean.getId());
bean.setStarted(true);
logger.info("[DataManagement] Purge Task configured, first execution : " + bean.getExecutionStartDate());
}
}
代码示例来源:origin: org.ow2.cmi/cmi-core-common
public synchronized final void stop() {
if(getState().equals(State.STARTED) || getState().equals(State.AVAILABLE)) {
setState(State.STOPPING);
stopping();
if(getConfig().isAdminEnabled()) {
// Unregister the CMI MBean
try {
MBeanUtils.unregisterCMIMBean();
} catch (CMIMBeanConfigException e) {
LOGGER.error("Cannot unregister CMIMBean", e);
}
}
setState(State.STOPPED);
LOGGER.info("Cluster view manager stopped.");
}
}
内容来源于网络,如有侵权,请联系作者删除!