本文整理汇总了Java中org.pentaho.di.core.logging.DefaultLogLevel类的典型用法代码示例。如果您正苦于以下问题:Java DefaultLogLevel类的具体用法?Java DefaultLogLevel怎么用?Java DefaultLogLevel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DefaultLogLevel类属于org.pentaho.di.core.logging包,在下文中一共展示了DefaultLogLevel类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: get
import org.pentaho.di.core.logging.DefaultLogLevel; //导入依赖的package包/类
public String get(String key, String ... params) {
String res = null;
String notFoundKey = "!" + key + "!";
for (String pName : packageNames) {
// Kettle will generate an exception message if there is a
// failed message search. Since we are searching over multiple
// packages, we don't want this message generated unless we
// cannot find the message in any of the packages.
LogLevel logLevel = DefaultLogLevel.getLogLevel();
DefaultLogLevel.setLogLevel(LogLevel.NOTHING);
try {
res = BaseMessages.getString(pName, key);
}
finally {
DefaultLogLevel.setLogLevel(logLevel);
}
if (!res.equals(notFoundKey)) {
return res;
}
}
// This means we did not find the key, so let Kettle generate
// its normal error.
return BaseMessages.getString(packageNames.get(0), key);
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:27,代码来源:AbstractMessages.java
示例2: getData
import org.pentaho.di.core.logging.DefaultLogLevel; //导入依赖的package包/类
public void getData()
{
wExecLocal.setSelection(configuration.isExecutingLocally());
wExecRemote.setSelection(configuration.isExecutingRemotely());
wSafeMode.setSelection(configuration.isSafeModeEnabled());
wClearLog.setSelection(configuration.isClearingLog());
wRemoteHost.setText( configuration.getRemoteServer()==null ? "" : configuration.getRemoteServer().toString() );
wPassExport.setSelection(configuration.isPassingExport());
wLogLevel.select( DefaultLogLevel.getLogLevel().getLevel() );
if (configuration.getReplayDate()!=null) wReplayDate.setText(simpleDateFormat.format(configuration.getReplayDate()));
String startCopy = "";
if (!Const.isEmpty(configuration.getStartCopyName())) {
JobEntryCopy copy = jobMeta.findJobEntry(configuration.getStartCopyName(), configuration.getStartCopyNr(), false);
if (copy!=null) {
startCopy = getJobEntryCopyName(copy);
}
}
wStartCopy.setText(startCopy);
getParamsData();
getArgumentsData();
getVariablesData();
enableFields();
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:27,代码来源:JobExecutionConfigurationDialog.java
示例3: ok
import org.pentaho.di.core.logging.DefaultLogLevel; //导入依赖的package包/类
private void ok()
{
int idx=wLoglevel.getSelectionIndex();
DefaultLogLevel.setLogLevel(LogLevel.values()[idx]);
String filter = wFilter.getText();
if (Const.isEmpty(filter)) {
LogWriter.getInstance().setFilter(null); // clear filter
} else {
LogWriter.getInstance().setFilter(wFilter.getText());
}
layout.setTimeAdded(wTime.getSelection());
props.setLogFilter(wFilter.getText());
props.setLogLevel(wLoglevel.getText());
props.saveProps();
dispose();
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:19,代码来源:LogSettingsDialog.java
示例4: getFields
import org.pentaho.di.core.logging.DefaultLogLevel; //导入依赖的package包/类
public void getFields(final RowMetaInterface row, final String origin,
final RowMetaInterface[] info, final StepMeta nextStep,
final VariableSpace space) throws KettleStepException {
if (databaseMeta == null)
throw new KettleStepException("There is no Palo database server connection defined");
final PaloHelper helper = new PaloHelper(databaseMeta, DefaultLogLevel.getLogLevel());
try {
helper.connect();
try {
final RowMetaInterface rowMeta = helper.getDimensionRowMeta(this.getDimension(),this.getLevels(), this.getBaseElementsOnly());
row.addRowMeta(rowMeta);
} finally {
helper.disconnect();
}
} catch (Exception e) {
throw new KettleStepException(e);
}
}
开发者ID:jjeb,项目名称:kettle-trunk,代码行数:22,代码来源:PaloDimInputMeta.java
示例5: getFields
import org.pentaho.di.core.logging.DefaultLogLevel; //导入依赖的package包/类
public void getFields(final RowMetaInterface row, final String origin,
final RowMetaInterface[] info, final StepMeta nextStep,
final VariableSpace space) throws KettleStepException {
if (databaseMeta == null)
throw new KettleStepException("There is no Palo database server connection defined");
final PaloHelper helper = new PaloHelper(databaseMeta, DefaultLogLevel.getLogLevel());
try {
helper.connect();
try {
final RowMetaInterface rowMeta = helper.getCellRowMeta(this.cube,this.fields,this.cubeMeasure);
row.addRowMeta(rowMeta);
} finally {
helper.disconnect();
}
} catch (Exception e) {
throw new KettleStepException(e);
}
}
开发者ID:jjeb,项目名称:kettle-trunk,代码行数:21,代码来源:PaloCellInputMeta.java
示例6: get
import org.pentaho.di.core.logging.DefaultLogLevel; //导入依赖的package包/类
public String get( String key, String... params ) {
String res = null;
String notFoundKey = "!" + key + "!";
for ( String pName : packageNames ) {
// Kettle will generate an exception message if there is a
// failed message search. Since we are searching over multiple
// packages, we don't want this message generated unless we
// cannot find the message in any of the packages.
LogLevel logLevel = DefaultLogLevel.getLogLevel();
DefaultLogLevel.setLogLevel( LogLevel.NOTHING );
try {
res = BaseMessages.getString( pName, key );
} finally {
DefaultLogLevel.setLogLevel( logLevel );
}
if ( !res.equals( notFoundKey ) ) {
return res;
}
}
// This means we did not find the key, so let Kettle generate
// its normal error.
return BaseMessages.getString( packageNames.get( 0 ), key );
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:26,代码来源:AbstractMessages.java
示例7: ok
import org.pentaho.di.core.logging.DefaultLogLevel; //导入依赖的package包/类
private void ok() {
int idx = wLoglevel.getSelectionIndex();
DefaultLogLevel.setLogLevel( LogLevel.values()[idx] );
/*
* String filter = wFilter.getText(); if (Utils.isEmpty(filter)) { LogWriter.getInstance().setFilter(null); // clear
* filter } else { LogWriter.getInstance().setFilter(wFilter.getText()); } //
* layout.setTimeAdded(wTime.getSelection());
*/
// props.setLogFilter(wFilter.getText());
props.setLogLevel( wLoglevel.getText() );
props.saveProps();
dispose();
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:17,代码来源:LogSettingsDialog.java
示例8: getFields
import org.pentaho.di.core.logging.DefaultLogLevel; //导入依赖的package包/类
public void getFields( final RowMetaInterface row, final String origin, final RowMetaInterface[] info,
final StepMeta nextStep, final VariableSpace space, Repository repository, IMetaStore metaStore )
throws KettleStepException {
if ( databaseMeta == null ) {
throw new KettleStepException( "There is no Palo database server connection defined" );
}
final PaloHelper helper = new PaloHelper( databaseMeta, DefaultLogLevel.getLogLevel() );
try {
helper.connect();
try {
final RowMetaInterface rowMeta =
helper.getDimensionRowMeta( this.getDimension(), this.getLevels(), this.getBaseElementsOnly() );
row.addRowMeta( rowMeta );
} finally {
helper.disconnect();
}
} catch ( Exception e ) {
throw new KettleStepException( e );
}
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:21,代码来源:PaloDimInputMeta.java
示例9: getFields
import org.pentaho.di.core.logging.DefaultLogLevel; //导入依赖的package包/类
@Override
public void getFields( final RowMetaInterface row, final String origin, final RowMetaInterface[] info,
final StepMeta nextStep, final VariableSpace space, Repository repository, IMetaStore metaStore )
throws KettleStepException {
if ( databaseMeta == null ) {
throw new KettleStepException( "There is no Palo database server connection defined" );
}
final PaloHelper helper = new PaloHelper( databaseMeta, DefaultLogLevel.getLogLevel() );
try {
helper.connect();
try {
final RowMetaInterface rowMeta = helper.getCellRowMeta( this.cube, this.fields, this.cubeMeasure );
row.addRowMeta( rowMeta );
} finally {
helper.disconnect();
}
} catch ( Exception e ) {
throw new KettleStepException( e );
}
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:21,代码来源:PaloCellInputMeta.java
示例10: getData
import org.pentaho.di.core.logging.DefaultLogLevel; //导入依赖的package包/类
/**
* Copy information from the meta-data input to the dialog fields.
*/
public void getData()
{
LogWriter logWriter = LogWriter.getInstance();
String filter = Const.NVL(logWriter.getFilter(), props.getLogFilter());
if (filter!=null)
{
wFilter.setText(filter);
}
wLoglevel.select( DefaultLogLevel.getLogLevel().getLevel() );
wTime.setSelection(layout.isTimeAdded());
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:16,代码来源:LogSettingsDialog.java
示例11: loadSettings
import org.pentaho.di.core.logging.DefaultLogLevel; //导入依赖的package包/类
public void loadSettings() {
LogLevel logLevel = LogLevel.getLogLevelForCode(props.getLogLevel());
DefaultLogLevel.setLogLevel(logLevel);
log.setLogLevel(logLevel);
LogWriter.getInstance().setFilter(props.getLogFilter());
CentralLogStore.getAppender().setMaxNrLines(props.getMaxNrLinesInLog());
// transMeta.setMaxUndo(props.getMaxUndo());
DBCache.getInstance().setActive(props.useDBCache());
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:11,代码来源:Spoon.java
示例12: getTranslation
import org.pentaho.di.core.logging.DefaultLogLevel; //导入依赖的package包/类
protected static String getTranslation(String string, String packageName, String altPackageName, Class<?> resourceClass) {
if (string.startsWith("i18n:")) {
String[] parts = string.split(":");
if (parts.length!=3) return string;
else {
return BaseMessages.getString(parts[1], parts[2]);
}
} else {
LogLevel oldLogLevel = DefaultLogLevel.getLogLevel();
// avoid i18n messages for missing locale
//
DefaultLogLevel.setLogLevel(LogLevel.BASIC);
// Try the default package name
//
String translation;
if (!Const.isEmpty(packageName)) {
translation=BaseMessages.getString(packageName, string, resourceClass);
if (translation.startsWith("!") && translation.endsWith("!")) translation=BaseMessages.getString(PKG, string, resourceClass);
// restore loglevel, when the last alternative fails, log it when loglevel is detailed
//
DefaultLogLevel.setLogLevel(oldLogLevel);
if (!Const.isEmpty(altPackageName)) {
if (translation.startsWith("!") && translation.endsWith("!")) translation=BaseMessages.getString(altPackageName, string, resourceClass);
}
} else {
// Translations are not supported, simply keep the original text.
//
translation=string;
}
return translation;
}
}
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:38,代码来源:BasePluginType.java
示例13: getData
import org.pentaho.di.core.logging.DefaultLogLevel; //导入依赖的package包/类
public void getData()
{
wExecLocal.setSelection(configuration.isExecutingLocally());
wExecRemote.setSelection(configuration.isExecutingRemotely());
wIgnoreCheckpoint.setSelection(configuration.isIgnoringCheckpoint());
wSafeMode.setSelection(configuration.isSafeModeEnabled());
wClearLog.setSelection(configuration.isClearingLog());
wRemoteHost.setText( configuration.getRemoteServer()==null ? "" : configuration.getRemoteServer().toString() );
wPassExport.setSelection(configuration.isPassingExport());
wLogLevel.select( DefaultLogLevel.getLogLevel().getLevel() );
if (configuration.getReplayDate()!=null) wReplayDate.setText(simpleDateFormat.format(configuration.getReplayDate()));
wGatherMetrics.setSelection(configuration.isGatheringMetrics());
String startCopy = "";
if (!Const.isEmpty(configuration.getStartCopyName())) {
JobEntryCopy copy = jobMeta.findJobEntry(configuration.getStartCopyName(), configuration.getStartCopyNr(), false);
if (copy!=null) {
startCopy = getJobEntryCopyName(copy);
}
}
wStartCopy.setText(startCopy);
getParamsData();
getArgumentsData();
getVariablesData();
enableFields();
}
开发者ID:jjeb,项目名称:kettle-trunk,代码行数:29,代码来源:JobExecutionConfigurationDialog.java
示例14: getTranslation
import org.pentaho.di.core.logging.DefaultLogLevel; //导入依赖的package包/类
protected static String getTranslation(String string, String packageName, String altPackageName, Class<?> resourceClass) {
if (string==null) return null;
if (string.startsWith("i18n:")) {
String[] parts = string.split(":");
if (parts.length!=3) return string;
else {
return BaseMessages.getString(parts[1], parts[2]);
}
} else {
LogLevel oldLogLevel = DefaultLogLevel.getLogLevel();
// avoid i18n messages for missing locale
//
DefaultLogLevel.setLogLevel(LogLevel.BASIC);
// Try the default package name
//
String translation;
if (!Const.isEmpty(packageName)) {
translation=BaseMessages.getString(packageName, string, resourceClass);
if (translation.startsWith("!") && translation.endsWith("!")) translation=BaseMessages.getString(PKG, string, resourceClass);
// restore loglevel, when the last alternative fails, log it when loglevel is detailed
//
DefaultLogLevel.setLogLevel(oldLogLevel);
if (!Const.isEmpty(altPackageName)) {
if (translation.startsWith("!") && translation.endsWith("!")) translation=BaseMessages.getString(altPackageName, string, resourceClass);
}
} else {
// Translations are not supported, simply keep the original text.
//
translation=string;
}
return translation;
}
}
开发者ID:jjeb,项目名称:kettle-trunk,代码行数:39,代码来源:BasePluginType.java
示例15: PaloDimOutputData
import org.pentaho.di.core.logging.DefaultLogLevel; //导入依赖的package包/类
public PaloDimOutputData(DatabaseMeta databaseMeta) throws KettleException {
super();
if(!(databaseMeta.getDatabaseInterface() instanceof PALODatabaseMeta )) {
throw new KettleException ("A connection of type PALO is expected");
}
//org.pentaho.di.core.logging.
this.helper = new PaloHelper(databaseMeta, DefaultLogLevel.getLogLevel());
}
开发者ID:jjeb,项目名称:kettle-trunk,代码行数:10,代码来源:PaloDimOutputData.java
示例16: PaloDimInputData
import org.pentaho.di.core.logging.DefaultLogLevel; //导入依赖的package包/类
public PaloDimInputData(DatabaseMeta databaseMeta) throws KettleException {
super();
if(!(databaseMeta.getDatabaseInterface() instanceof PALODatabaseMeta) ) {
throw new KettleException ("A connection of type PALO is expected");
}
this.helper = new PaloHelper(databaseMeta, DefaultLogLevel.getLogLevel());
}
开发者ID:jjeb,项目名称:kettle-trunk,代码行数:8,代码来源:PaloDimInputData.java
示例17: PaloCellInputData
import org.pentaho.di.core.logging.DefaultLogLevel; //导入依赖的package包/类
public PaloCellInputData(DatabaseMeta databaseMeta) throws KettleException {
super();
if(!(databaseMeta.getDatabaseInterface() instanceof PALODatabaseMeta)) {
throw new KettleException ("A connection of type PALO is expected");
}
this.helper = new PaloHelper(databaseMeta, DefaultLogLevel.getLogLevel());
}
开发者ID:jjeb,项目名称:kettle-trunk,代码行数:8,代码来源:PaloCellInputData.java
示例18: PaloCellOutputData
import org.pentaho.di.core.logging.DefaultLogLevel; //导入依赖的package包/类
public PaloCellOutputData(DatabaseMeta databaseMeta) throws KettleException {
super();
if(!(databaseMeta.getDatabaseInterface() instanceof PALODatabaseMeta)) {
throw new KettleException ("A connection of type PALO is expected");
}
this.helper = new PaloHelper(databaseMeta, DefaultLogLevel.getLogLevel());
}
开发者ID:jjeb,项目名称:kettle-trunk,代码行数:8,代码来源:PaloCellOutputData.java
示例19: doSelectConnection
import org.pentaho.di.core.logging.DefaultLogLevel; //导入依赖的package包/类
private void doSelectConnection(boolean clearCurrentData ) {
try {
if(clearCurrentData) {
comboCubeName.removeAll();
}
if (comboCubeName.getItemCount() > 1)
return;
if(addConnectionLine.getText() != null) {
DatabaseMeta dbMeta = DatabaseMeta.findDatabase(jobMeta.getDatabases(), addConnectionLine.getText());
if (dbMeta != null) {
PaloHelper helper = new PaloHelper(dbMeta, DefaultLogLevel.getLogLevel());
helper.connect();
List<String> cubes = helper.getCubesNames();
Collections.sort(cubes, new PaloNameComparator());
for (String cubename : cubes){
if(comboCubeName.indexOf(cubename) == -1)
comboCubeName.add(cubename);
}
helper.disconnect();
}
}
} catch (Exception ex) {
new ErrorDialog(shell, BaseMessages.getString(PKG,"PaloDimInputFlatDialog.RetreiveDimensionsErrorTitle") , BaseMessages.getString(PKG,"PaloDimInputFlatDialog.RetreiveDimensionsError") , ex);
}
}
开发者ID:jjeb,项目名称:kettle-trunk,代码行数:28,代码来源:PaloCubeDeleteDialog.java
示例20: getData
import org.pentaho.di.core.logging.DefaultLogLevel; //导入依赖的package包/类
public void getData() {
wSafeMode.setSelection( configuration.isSafeModeEnabled() );
wClearLog.setSelection( configuration.isClearingLog() );
wExpandRemote.setSelection( getConfiguration().isExpandingRemoteJob() );
wLogLevel.select( DefaultLogLevel.getLogLevel().getLevel() );
wGatherMetrics.setSelection( configuration.isGatheringMetrics() );
List<String> runConfigurations = new ArrayList<>();
try {
ExtensionPointHandler
.callExtensionPoint( Spoon.getInstance().getLog(), KettleExtensionPoint.SpoonRunConfiguration.id,
new Object[] { runConfigurations, JobMeta.XML_TAG } );
} catch ( KettleException e ) {
// Ignore errors
}
wRunConfiguration.setItems( runConfigurations.toArray( new String[ 0 ] ) );
if ( !runConfigurations.contains( getConfiguration().getRunConfiguration() ) ) {
getConfiguration().setRunConfiguration( null );
}
if ( Utils.isEmpty( getConfiguration().getRunConfiguration() ) ) {
wRunConfiguration.select( 0 );
} else {
wRunConfiguration.setText( getConfiguration().getRunConfiguration() );
}
String startCopy = "";
if ( !Utils.isEmpty( getConfiguration().getStartCopyName() ) ) {
JobEntryCopy copy =
( (JobMeta) abstractMeta ).findJobEntry( getConfiguration().getStartCopyName(), getConfiguration()
.getStartCopyNr(), false );
if ( copy != null ) {
startCopy = getJobEntryCopyName( copy );
}
}
wStartCopy.setText( startCopy );
getParamsData();
getVariablesData();
}
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:41,代码来源:JobExecutionConfigurationDialog.java
注:本文中的org.pentaho.di.core.logging.DefaultLogLevel类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论