本文整理了Java中net.roboconf.core.utils.Utils.writeException()
方法的一些代码示例,展示了Utils.writeException()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils.writeException()
方法的具体详情如下:
包路径:net.roboconf.core.utils.Utils
类名称:Utils
方法名:writeException
[英]Writes an exception's stack trace into a string.
#logException(Logger,Exception) has better performances and should be used for logging purpose.
[中]将异常的堆栈跟踪写入字符串。
#logException(Logger,Exception)具有更好的性能,应该用于日志记录。
代码示例来源:origin: net.roboconf/roboconf-iaas-azure
private String getStringFromInputStream( InputStream in ) {
String result = "";
ByteArrayOutputStream os = new ByteArrayOutputStream();
try {
Utils.copyStream( in, os );
result = os.toString( "UTF-8" );
} catch( IOException e ) {
this.logger.severe( e.getMessage());
this.logger.finest( Utils.writeException( e ));
}
return result;
}
代码示例来源:origin: net.roboconf/roboconf-iaas-in-memory
@Override
public void run() {
try {
File tempDir = new File( System.getProperty( "java.io.tmpdir" ));
agentLauncher.launchAgent( ExecutionLevel.RUNNING, tempDir );
} catch( IOException e ) {
Logger logger = Logger.getLogger( getClass().getName());
logger.severe( "An error occurred in an agent (in-memory). " + e.getMessage());
logger.finest( Utils.writeException( e ));
}
};
}.start();
代码示例来源:origin: net.roboconf/roboconf-iaas-openstack
this.logger.finest( Utils.writeException( e ));
throw new IaasException( e );
内容来源于网络,如有侵权,请联系作者删除!