- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中com.quinsoft.zeidon.ZeidonLogger
类的一些代码示例,展示了ZeidonLogger
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZeidonLogger
类的具体详情如下:
包路径:com.quinsoft.zeidon.ZeidonLogger
类名称:ZeidonLogger
[英]Extends SLF4J logger with some convenience methods.
[中]使用一些方便的方法扩展SLF4J记录器。
代码示例来源:origin: com.quinsoft.zeidon/zeidon-joe
private void close(ResultSet rs)
{
try
{
if (rs != null)
{
rs.close();
}
}
catch (SQLException e)
{
task.dblog().error( e );
}
}
代码示例来源:origin: com.quinsoft.zeidon/zeidon-joe
logger.info( "%s %s", key, value );
代码示例来源:origin: com.quinsoft.zeidon/object-browser
@Override
public void actionPerformed( ActionEvent e )
{
if ( e.getActionCommand().equals( "OK" ) )
{
task.log().setLevel( group.getSelection().getActionCommand() );
task.dblog().setLevel( group.getSelection().getActionCommand() );
frame.dispose();
return;
}
task.log().setLevel( e.getActionCommand() );
task.dblog().setLevel( e.getActionCommand() );
}
}
代码示例来源:origin: com.quinsoft.zeidon/zeidon-joe
/**
* Writes the SQL to the log if either log() or dblog() has DEBUG on.
*
* @param sql
*/
protected void logSql( String sql )
{
if ( task.log().isDebugEnabled() )
task.log().debug( "<SQL>\n%s\n</SQL>", sql );
else
if ( task.dblog().isDebugEnabled() )
task.dblog().debug( "<SQL>\n%s\n</SQL>", sql );
}
代码示例来源:origin: com.quinsoft.zeidon/zeidon-joe
private void readFileMeta() throws Exception
{
jp.nextToken();
while ( jp.nextToken() != JsonToken.END_OBJECT )
{
String fieldName = jp.getCurrentName();
jp.nextToken(); // Move to value.
switch ( fieldName )
{
case "version":
version = jp.getValueAsString();
task.log().debug( "JSON version: %s", version );
break;
case "date":
break;
default:
task.log().warn( "Unknown .oimeta fieldname %s", fieldName );
}
}
jp.nextToken();
}
代码示例来源:origin: com.quinsoft.zeidon/zeidon-joe
protected boolean appendString( SqlStatement stmt, StringBuilder buffer, Object value )
{
String str = value.toString();
if ( str.length() > MAX_INLINE_STRING_LENGTH || bindAllValues)
{
if ( getTask().dblog().isTraceEnabled() )
getTask().dblog().trace( "Bound string: length = %d, value = %s...", str.length(), StringUtils.substring( str, 0, 50 ) );
stmt.addBoundAttribute( buffer, value );
}
else
{
buffer.append( "'" ).append( StringUtils.replace( str, "'", "''" ) ).append( "'" );
}
return true;
}
代码示例来源:origin: com.quinsoft.zeidon/zeidon-joe
task.log().debug( "Caught exception writing pessimisic locks on %s. Trying again", lodDef );
break;
task.log().info( "Caught exception writing pessimisic locks on %s. Trying again", lodDef );
break;
task.log().warn( "Caught exception writing pessimisic locks on %s. Trying again", lodDef );
lockOi.logObjectInstance();
代码示例来源:origin: com.quinsoft.zeidon/object-browser
void warn( String format, Object...args )
{
oe.getSystemTask().log().warn( format, args );
}
代码示例来源:origin: com.quinsoft.zeidon/zeidon-joe
InputStream stream = response.getEntity().getContent();
StatusLine status = response.getStatusLine();
task.log().info( "Status from http activate = %s", status );
int statusCode = status.getStatusCode();
if ( task.log().isDebugEnabled() || statusCode != 200 )
task.log().debug( "REST response: %s", stringResponse );
stream = IOUtils.toInputStream(stringResponse, "UTF-8");
代码示例来源:origin: com.quinsoft.zeidon/zeidon-joe
@Override
public boolean beginTransaction(View view )
{
getTask().dblog().debug( "TestSql: Begin Transaction" );
return true;
}
代码示例来源:origin: com.quinsoft.zeidon/zeidon-joe
task.dblog().debug( "setMaxRows = %d", stmt.activateLimit );
ps.setMaxRows( stmt.activateLimit );
task.dblog().trace( "Using cached statement for Entity => %s \n=> %s", entityDef, sql );
ps = value.ps;
task.dblog().debug( "setMaxRows = %d", stmt.activateLimit );
ps.setMaxRows( stmt.activateLimit );
if ( task.dblog().isDebugEnabled() )
task.dblog().debug( "Bind idx %d = %s (attr value)", idx, leftStr( valueAsString ) );
代码示例来源:origin: com.quinsoft.zeidon/zeidon-joe
@Override
public void validateInternalValue( Task task, AttributeDef attributeDef, Object internalValue ) throws InvalidAttributeValueException
{
String phone = checkNullString( internalValue );
if ( phone != null && phone.isEmpty( ) == false )
{
// Checks for US style telephone numbers ...
// 10 digit accepts () around area code, and doesn't allow preceeding 1 as country code
// Phone Number formats: (nnn)nnn-nnnn; nnnnnnnnnn; nnn-nnn-nnnn
// ^\\(? : May start with an optional "(" .
// (\\d{3}): Followed by 3 digits.
// \\)? : May have an optional ")"
// [- ]? : May have an optional "-" after the first 3 digits or after optional ) character.
// (\\d{3}) : Followed by 3 digits.
// [- ]? : May have another optional "-" after numeric digits.
// (\\d{4})$ : ends with four digits.
// String expressionPhone = "(?:(?:(\\s*\\(?([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9])\\s*)|([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9]))\\)?\\s*(?:[.-]\\s*)?)([2-9]1[02-9]|[2-9][02-9]1|[2-9][02-9]{2})\\s*(?:[.-]\\s*)?([0-9]{4})";
String expression = "^[+]?\\(?(\\d{3})\\)?[- ]?(\\d{3})[- ]?(\\d{4})$"; // e.g. matches following phone numbers: (123)456-7890, 123-456-7890, 1234567890, (123)-456-7890
CharSequence inputStr = phone;
Pattern pattern = Pattern.compile( expression );
Matcher matcher = pattern.matcher( inputStr );
if ( matcher.matches( ) == false )
{
task.log().trace( "Invalid telephone number: " + phone );
throw new InvalidAttributeValueException( attributeDef, phone, "Value must be a valid phone number" );
}
phone = phone.replaceAll( "[^0-9]", "" );
}
super.validateInternalValue( task, attributeDef, phone );
}
代码示例来源:origin: com.quinsoft.zeidon/zeidon-joe
@Override
public void endTransaction(boolean commit)
{
try
{
// Close any statements that were cached.
if ( cachedStatements != null )
{
for ( PreparedStatementCacheValue v : cachedStatements.values() )
DbUtils.closeQuietly( v.ps );
task.dblog().trace( "Loaded %d statements from cache\nTotal cache size = %d",
cachedStatementCount, cachedStatements.size() );
cachedStatements.clear();
}
if ( closeTransaction )
{
if ( commit )
transaction.getConnection().commit();
else
transaction.getConnection().rollback();
transaction.close();
task.dblog().debug( "JDBC: closed transaction" );
transaction = null;
}
}
catch ( Throwable e )
{
throw ZeidonException.prependMessage( e, "JDBC = %s", options.getOiSourceUrl() );
}
}
代码示例来源:origin: com.quinsoft.zeidon/zeidon-joe
protected void logSql( SqlStatement sql )
{
if ( task.log().isDebugEnabled() || task.dblog().isDebugEnabled() )
logSql( sql.toString() );
}
代码示例来源:origin: com.quinsoft.zeidon/object-browser
SetLogLevelAction action = new SetLogLevelAction( t, frame, group );
String currentLevel = t.log().getLoggerLevel().toString();
代码示例来源:origin: com.quinsoft.zeidon/zeidon-joe
private EntityMeta readEntityMeta(EntityInstanceImpl ei) throws Exception
{
EntityMeta meta = new EntityMeta();
while ( jp.nextToken() != JsonToken.END_OBJECT )
{
String fieldName = jp.getCurrentName();
switch ( fieldName )
{
case "incrementals" : readIncrementals( meta ); break;
case "isLinkedSource" : meta.isLinkedSource = true; break;
case "entityKey" : meta.entityKey = jp.getText(); break;
case "linkedSource" : meta.linkedSource = jp.getText(); break;
case "selected" : selectedInstances.add( ei ); break;
case "incomplete" : meta.incomplete = true; break;
case "lazyLoaded" : meta.lazyLoaded = jp.getText(); break;
default: task.log().warn( "Unknown entity meta value %s", fieldName );
}
}
entityMetas.put( ei, meta );
return meta;
}
代码示例来源:origin: com.quinsoft.zeidon/zeidon-joe
@SuppressWarnings("unchecked")
@Override
public Domain loadDomain(Application application, Map<String, Object> domainProperties, Task task)
{
try
{
String className = (String) domainProperties.get( "JavaClass" );
String domainName = (String) domainProperties.get( "Name" );
Class<? extends Domain> cl = null;
ClassLoader classLoader = getClass().getClassLoader();
cl = (Class<? extends Domain>) classLoader.loadClass( className );
Constructor<? extends Domain> constructor = cl.getConstructor( constructorArgTypes);
Domain domain = constructor.newInstance( application, domainProperties, task );
task.log().debug( "Loaded class %s for domain %s", className, domainName );
return domain;
}
catch ( Throwable t )
{
throw ZeidonException.wrapException( t );
}
}
}
代码示例来源:origin: com.quinsoft.zeidon/zeidon-joe
task.log().debug( "Found resource at " + element );
else
LOG.debug( "--Found resource at " + element );
task.log().warn( "Multiple, identical resources found of %s. This usually means your classpath has duplicates", resourceName );
else
LOG.warn( "Multiple, identical resources found of " + resourceName + " This usually means your classpath has duplicates" );
代码示例来源:origin: com.quinsoft.zeidon/zeidon-joe
@Override
public void acquireGlobalLock( View view ) throws PessimisticLockingException
{
createLockOi( task );
addGlobalLockToLockOi();
addQualLocksToLockOi();
// To minimize attempts to write to the DB we'll use a global Java
// lock to single-thread writes for the current JVM.
view.log().trace( "Locking global Java lock" );
getJavaLock().lock.lock();
view.log().trace( "Global Java acquired" );
writeLocks( view );
}
代码示例来源:origin: com.quinsoft.zeidon/zeidon-joe
if ( task.dblog().isDebugEnabled() )
task.dblog().debug( "Activated %d %s entities for %s", entityCounts.get( ve ), ve, parentCursor );
task.dblog().debug( "Activated %d %s entities", entityCounts.get( ve ), ve );
本文整理了Java中com.quinsoft.zeidon.ZeidonLogger类的一些代码示例,展示了ZeidonLogger类的具体用法。这些代码示例主要来源于Github/Stackover
本文整理了Java中com.quinsoft.zeidon.ZeidonException类的一些代码示例,展示了ZeidonException类的具体用法。这些代码示例主要来源于Github/Sta
本文整理了Java中com.quinsoft.zeidon.ZeidonLogger.info()方法的一些代码示例,展示了ZeidonLogger.info()的具体用法。这些代码示例主要来源于Gi
本文整理了Java中com.quinsoft.zeidon.ZeidonException.prependFilename()方法的一些代码示例,展示了ZeidonException.prependF
本文整理了Java中com.quinsoft.zeidon.ZeidonLogger.setLevel()方法的一些代码示例,展示了ZeidonLogger.setLevel()的具体用法。这些代码示
本文整理了Java中com.quinsoft.zeidon.ZeidonException.wrapException()方法的一些代码示例,展示了ZeidonException.wrapExcept
本文整理了Java中com.quinsoft.zeidon.ZeidonLogger.warn()方法的一些代码示例,展示了ZeidonLogger.warn()的具体用法。这些代码示例主要来源于Gi
本文整理了Java中com.quinsoft.zeidon.ZeidonLogger.error()方法的一些代码示例,展示了ZeidonLogger.error()的具体用法。这些代码示例主要来源于
我是一名优秀的程序员,十分优秀!