本文整理了Java中org.eclipse.jem.util.logger.proxy.Logger.write()
方法的一些代码示例,展示了Logger.write()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.write()
方法的具体详情如下:
包路径:org.eclipse.jem.util.logger.proxy.Logger
类名称:Logger
方法名:write
[英]deprecated use log(Throwable)
[中]不推荐使用日志(可丢弃)
代码示例来源:origin: org.eclipse/org.eclipse.jst.j2ee.core
protected void log(IEJBValidationContext vc, String message) {
Logger logger = vc.getMsgLogger();
if (logger != null && logger.isLoggingLevel(Level.SEVERE)) {
logger.write(Level.SEVERE, message);
}
}
代码示例来源:origin: org.eclipse/org.eclipse.wst.validation
private void logInvocationTargetException(Logger logger, InvocationTargetException exc) {
if (logger.isLoggingLevel(Level.SEVERE)) {
LogEntry entry = ValidationPlugin.getLogEntry();
entry.setSourceID("ValidationBuilder::build"); //$NON-NLS-1$
entry.setTargetException(exc);
logger.write(Level.SEVERE, entry);
if (exc.getTargetException() != null) {
entry.setTargetException(exc);
logger.write(Level.SEVERE, entry);
}
}
}
代码示例来源:origin: org.eclipse/org.eclipse.jst.j2ee
protected IModule[] createModules(IProject project) {
try {
ModuleCoreNature nature = (ModuleCoreNature) project.getNature(IModuleConstants.MODULE_NATURE_ID);
if (nature != null)
return createModules(nature);
} catch (CoreException e) {
Logger.getLogger().write(e);
}
return null;
}
代码示例来源:origin: org.eclipse/org.eclipse.jst.jee
protected IModule[] createModules(IProject project) {
try {
ModuleCoreNature nature = (ModuleCoreNature) project.getNature(IModuleConstants.MODULE_NATURE_ID);
if (nature != null)
return createModules(nature);
} catch (CoreException e) {
Logger.getLogger().write(e);
}
return null;
}
代码示例来源:origin: org.eclipse/org.eclipse.jst.j2ee.core
protected void logMissingRule(IEJBValidationContext vc, Object ruleId) {
Logger logger = vc.getMsgLogger();
if (logger != null && logger.isLoggingLevel(Level.SEVERE)) {
logger.write(Level.SEVERE, ruleId + " = null"); //$NON-NLS-1$
}
addInternalErrorMessage(vc);
}
代码示例来源:origin: org.eclipse/org.eclipse.jst.j2ee.core
protected void logMissingRule(IEJBValidationContext vc, Object ruleId) {
Logger logger = vc.getMsgLogger();
if (logger != null && logger.isLoggingLevel(Level.SEVERE)) {
logger.write(Level.SEVERE, ruleId + " = null"); //$NON-NLS-1$
}
addInternalErrorMessage(vc);
}
protected void addInternalErrorMessage(IEJBValidationContext vc) {
代码示例来源:origin: org.wso2.carbonstudio/org.eclipse.bpel.runtimes
protected IModule createModuleDelegates(IProject project, IFile file) {
try {
IModule module = createModule(
project.getName().concat(">>" + file.getProjectRelativePath().toString()),
project.getName() + "/" + file.getProjectRelativePath().toString(),
IBPELModuleFacetConstants.BPEL20_MODULE_TYPE,
getVersion(project),
project);
BPELModuleDelegate moduleDelegate = new BPELModuleDelegate(project, file);
moduleDelegates.put(module, moduleDelegate);
return module;
} catch (Exception e) {
Logger.getLogger().write(e);
}
return null;
}
代码示例来源:origin: org.eclipse/org.eclipse.wst.validation
private void logBuildError(Logger logger, Throwable exc) {
if (logger.isLoggingLevel(Level.SEVERE)) {
if( ! (exc instanceof OperationCanceledException) ){
LogEntry entry = ValidationPlugin.getLogEntry();
entry.setSourceID("ValidationBuilder.build(int, Map, IProgressMonitor)"); //$NON-NLS-1$
entry.setTargetException(exc);
logger.write(Level.SEVERE, entry);
}
}
}
代码示例来源:origin: org.eclipse/org.eclipse.jst.jee
protected IModule[] createModules(ModuleCoreNature nature) {
IProject project = nature.getProject();
try {
IVirtualComponent comp = ComponentCore.createComponent(project);
return createModuleDelegates(comp);
} catch (Exception e) {
Logger.getLogger().write(e);
}
return null;
}
代码示例来源:origin: org.eclipse/org.eclipse.jst.j2ee
protected IModule[] createModules(ModuleCoreNature nature) {
IProject project = nature.getProject();
try {
IVirtualComponent comp = ComponentCore.createComponent(project);
return createModuleDelegates(comp);
} catch (Exception e) {
Logger.getLogger().write(e);
}
return null;
}
代码示例来源:origin: org.eclipse/org.eclipse.jst.j2ee.core
private void addInternalErrorMessage(IEJBValidationContext vc, Throwable exc) {
IMessage mssg = vc.getMessage();
mssg.setId(IEJBValidatorMessageConstants.CHKJ2900);
vc.addMessage(mssg);
if(exc != null) {
Logger logger = vc.getMsgLogger();
if (logger != null && logger.isLoggingLevel(Level.SEVERE)) {
logger.write(Level.SEVERE, exc);
}
}
}
代码示例来源:origin: org.eclipse/org.eclipse.jst.j2ee.core
protected void addInternalErrorMessage(IEJBValidationContext vc, Throwable exc) {
IMessage mssg = vc.getMessage();
mssg.setId(IEJBValidatorMessageConstants.CHKJ2900);
vc.addMessage(mssg);
if(exc != null) {
Logger logger = vc.getMsgLogger();
if (logger != null && logger.isLoggingLevel(Level.SEVERE)) {
logger.write(Level.SEVERE, exc);
}
}
}
代码示例来源:origin: org.eclipse/org.eclipse.jst.j2ee.core
protected void addInternalErrorMessage(IEJBValidationContext vc, Throwable exc) {
IMessage mssg = vc.getMessage();
mssg.setId(internalErrorMessage());
vc.addMessage(mssg);
if(exc != null) {
Logger logger = vc.getMsgLogger();
if (logger != null && logger.isLoggingLevel(Level.SEVERE)) {
logger.write(Level.SEVERE, exc);
}
}
}
代码示例来源:origin: org.eclipse/org.eclipse.wst.validation
private void logDisabledValidator(IllegalArgumentException exc) {
// Even the IValidator is invalid. Unfortunately, can't disable the
// validator because it can't be found by the registry reader.
// Log the reason for the disabled validator
Logger logger = ValidationPlugin.getPlugin().getMsgLogger();
if (logger.isLoggingLevel(Level.SEVERE)) {
LogEntry entry = ValidationPlugin.getLogEntry();
entry.setSourceID("WorkbenchReporter::addMessage(IValidator, IMessage)"); //$NON-NLS-1$
entry.setTargetException(exc);
logger.write(Level.SEVERE, entry);
}
return;
}
代码示例来源:origin: org.eclipse/org.eclipse.wst.validation
private void logBuilderTimeEntry(long start, int executionMap, Logger logger, IResourceDelta delta) {
TimeEntry entry = ValidationPlugin.getTimeEntry();
entry.setSourceID("ValidationBuilder.build(int, Map, IProgressMonitor)"); //$NON-NLS-1$
entry.setProjectName(getProject().getName()); //$NON-NLS-1$ //$NON-NLS-2$
entry.setExecutionMap(executionMap);
entry.setElapsedTime(System.currentTimeMillis() - start);
if (delta == null) {
entry.setDetails("delta == null"); //$NON-NLS-1$
}
entry.setToolName("ValidationBuilder"); //$NON-NLS-1$
logger.write(Level.FINE, entry);
}
}
代码示例来源:origin: org.eclipse/org.eclipse.jst.j2ee.ejb
public static String getExternalizedMessage(String key) {
try {
return J2EEValidationResourceHandler.getExternalizedMessage(VALIDATION_PROP_FILE_NAME, key, getHandler().getClass());
} catch (NullPointerException exc) {
if (getMsgLogger().isLoggingLevel(Level.SEVERE)) {
LogEntry entry = getLogEntry();
entry.setSourceID("ResourceHandler.getExternalizedMessage(String)"); //$NON-NLS-1$
entry.setText(key);
entry.setTargetException(exc);
getMsgLogger().write(Level.SEVERE, entry);
}
}
return ""; //$NON-NLS-1$
}
代码示例来源:origin: org.eclipse/org.eclipse.wst.validation
public static void removeAllMessages(IResource resource, String[] validatorNames, String targetObjectName) {
try {
TaskListUtility.removeAllTasks(resource, validatorNames, targetObjectName);
} catch (CoreException exc) {
// Couldn't remove the task from the task list for some reason...
Logger logger = ValidationPlugin.getPlugin().getMsgLogger();
if (logger.isLoggingLevel(Level.SEVERE)) {
LogEntry entry = ValidationPlugin.getLogEntry();
entry.setSourceID("WorkbenchReporter.removeAllMessages(String[], IResource, String)"); //$NON-NLS-1$
entry.setTargetException(exc);
logger.write(Level.SEVERE, entry);
}
}
}
代码示例来源:origin: org.eclipse/org.eclipse.wst.validation
public static void removeMessageSubset(IResource resource, String[] ownerId, String targetObjectName, String groupName) {
try {
TaskListUtility.removeTaskSubset(resource, ownerId, targetObjectName, groupName);
} catch (CoreException exc) {
// Couldn't remove the task to the task list for some reason...
Logger logger = ValidationPlugin.getPlugin().getMsgLogger();
if (logger.isLoggingLevel(Level.SEVERE)) {
LogEntry entry = ValidationPlugin.getLogEntry();
entry.setSourceID("WorkbenchReporter.removeMessageSubset(String[], IResource, String, String)"); //$NON-NLS-1$
entry.setTargetException(exc);
logger.write(Level.SEVERE, entry);
}
}
}
代码示例来源:origin: org.eclipse/org.eclipse.wst.validation
public static void addMessage(IResource resource, String messageOwnerId, ClassLoader cl, IMessage message, String targetObjectName, String location) {
int severity = message.getSeverity();
try {
TaskListUtility.addTask(messageOwnerId, resource, location, message.getId(), message.getText(cl), severity,targetObjectName, message.getGroupName(), message.getOffset(), message.getLength());
} catch (CoreException exc) {
// Couldn't add the task to the task list for some reason...
Logger logger = ValidationPlugin.getPlugin().getMsgLogger();
if (logger.isLoggingLevel(Level.SEVERE)) {
LogEntry entry = ValidationPlugin.getLogEntry();
entry.setSourceID("WorkbenchReporter.addMessage(Class,, IResource, IMessage, String, String"); //$NON-NLS-1$
entry.setTargetException(exc);
logger.write(Level.SEVERE, entry);
}
}
}
代码示例来源:origin: org.eclipse/org.eclipse.wst.validation
public static void addMessage(IResource resource, String messageOwnerId, ClassLoader cl, IMessage message, String targetObjectName, String location, String markerId) {
int severity = message.getSeverity();
try {
TaskListUtility.addTask(messageOwnerId, resource, location, message.getId(), message.getText(cl), severity,markerId,targetObjectName, message.getGroupName(), message.getOffset(), message.getLength());
} catch (CoreException exc) {
// Couldn't add the task to the task list for some reason...
Logger logger = ValidationPlugin.getPlugin().getMsgLogger();
if (logger.isLoggingLevel(Level.SEVERE)) {
LogEntry entry = ValidationPlugin.getLogEntry();
entry.setSourceID("WorkbenchReporter.addMessage(Class,, IResource, IMessage, String, String"); //$NON-NLS-1$
entry.setTargetException(exc);
logger.write(Level.SEVERE, entry);
}
}
}
内容来源于网络,如有侵权,请联系作者删除!