本文整理汇总了Java中org.pentaho.di.core.logging.LogWriter.LOG_LEVEL_ERROR属性的典型用法代码示例。如果您正苦于以下问题:Java LogWriter.LOG_LEVEL_ERROR属性的具体用法?Java LogWriter.LOG_LEVEL_ERROR怎么用?Java LogWriter.LOG_LEVEL_ERROR使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.pentaho.di.core.logging.LogWriter
的用法示例。
在下文中一共展示了LogWriter.LOG_LEVEL_ERROR属性的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setLog
private void setLog(LogWriter log, int loglevel, StringBuffer msg)
{
switch (loglevel) {
case LogWriter.LOG_LEVEL_ERROR:
// Output message to log
// Log level = ERREUR
log.logError(toString(), msg.toString());
break;
case LogWriter.LOG_LEVEL_MINIMAL:
// Output message to log
// Log level = MINIMAL
log.logMinimal(toString(), msg.toString());
break;
case LogWriter.LOG_LEVEL_BASIC:
// Output message to log
// Log level = BASIC
log.logBasic(toString(), msg.toString());
break;
case LogWriter.LOG_LEVEL_DETAILED:
// Output message to log
// Log level = DETAILED
log.logDetailed(toString(), msg.toString());
break;
case LogWriter.LOG_LEVEL_DEBUG:
// Output message to log
// Log level = DEBUG
log.logDebug(toString(), msg.toString());
break;
case LogWriter.LOG_LEVEL_ROWLEVEL:
// Output message to log
// Log level = ROW LEVEL
log.logRowlevel(toString(), msg.toString());
break;
default:
// Output message to log
// Log level = BASIC
log.logBasic(toString(), msg.toString());
break;
}
}
示例2: test_MAPPING_INPUT_ONLY
public void test_MAPPING_INPUT_ONLY() throws Exception
{
TimedTransRunner timedTransRunner = new TimedTransRunner(
"test/org/pentaho/di/trans/steps/mapping/filereader/use filereader.ktr",
LogWriter.LOG_LEVEL_ERROR,
getTargetDatabase(),
1000
);
timedTransRunner.init();
assertTrue( timedTransRunner.runEngine(true) );
Result newResult = timedTransRunner.getNewResult();
assertTrue(newResult.getNrErrors()==0);
}
示例3: test_MAPPING_OUTPUT_ONLY
public void test_MAPPING_OUTPUT_ONLY() throws Exception
{
TimedTransRunner timedTransRunner = new TimedTransRunner(
"test/org/pentaho/di/trans/steps/mapping/filewriter/use filewriter.ktr",
LogWriter.LOG_LEVEL_ERROR,
getTargetDatabase(),
1000
);
timedTransRunner.init();
assertTrue( timedTransRunner.runEngine(true) );
Result newResult = timedTransRunner.getNewResult();
assertTrue(newResult.getNrErrors()==0);
}
示例4: test_MAPPING_MULTI_OUTPUT
public void test_MAPPING_MULTI_OUTPUT() throws Exception
{
TimedTransRunner timedTransRunner = new TimedTransRunner(
"test/org/pentaho/di/trans/steps/mapping/multi_output/use filereader.ktr",
LogWriter.LOG_LEVEL_ERROR,
getTargetDatabase(),
1000
);
timedTransRunner.init();
assertTrue( timedTransRunner.runEngine(true) );
Result newResult = timedTransRunner.getNewResult();
assertTrue(newResult.getNrErrors()==0);
}
示例5: evaluate
/**
* Output message to job log.
*/
public boolean evaluate(Result result)
{
LogWriter log = LogWriter.getInstance();
try
{
loglevel=loglevel+1;
if (loglevel==LogWriter.LOG_LEVEL_ERROR)
{
// Output message to log
// Log level = ERREUR
log.logError(Const.CR + getRealLogSubject()+ Const.CR, getRealLogMessage()+ Const.CR);
}
else if (loglevel==LogWriter.LOG_LEVEL_MINIMAL)
{
// Output message to log
// Log level = MINIMAL
log.logMinimal(Const.CR + getRealLogSubject()+ Const.CR, getRealLogMessage()+ Const.CR);
}
else if (loglevel==LogWriter.LOG_LEVEL_BASIC)
{
// Output message to log
// Log level = BASIC
log.logBasic(Const.CR + getRealLogSubject()+ Const.CR, getRealLogMessage()+ Const.CR);
}
else if (loglevel==LogWriter.LOG_LEVEL_DETAILED)
{
// Output message to log
// Log level = DETAILED
log.logDetailed(Const.CR + getRealLogSubject()+ Const.CR, getRealLogMessage()+ Const.CR);
}
else if (loglevel==LogWriter.LOG_LEVEL_DEBUG)
{
// Output message to log
// Log level = DEBUG
log.logDebug(Const.CR + getRealLogSubject()+ Const.CR, getRealLogMessage()+ Const.CR);
}
else if (loglevel==LogWriter.LOG_LEVEL_ROWLEVEL)
{
// Output message to log
// Log level = ROWLEVEL
log.logRowlevel(Const.CR + getRealLogSubject()+ Const.CR, getRealLogMessage()+ Const.CR);
}
return true;
}
catch(Exception e)
{
result.setNrErrors(1);
log.logError(Messages.getString("WriteToLog.Error.Label"), Messages.getString("WriteToLog.Error.Description") + " : "+e.toString());
return false;
}
}