本文整理汇总了Java中org.pentaho.di.core.logging.LogChannel类的典型用法代码示例。如果您正苦于以下问题:Java LogChannel类的具体用法?Java LogChannel怎么用?Java LogChannel使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
LogChannel类属于org.pentaho.di.core.logging包,在下文中一共展示了LogChannel类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getData
import org.pentaho.di.core.logging.LogChannel; //导入依赖的package包/类
private void getData() {
try {
MetaStoreFactory<StreamingService> factory = new MetaStoreFactory<StreamingService>(StreamingService.class, metaStore, PentahoDefaults.NAMESPACE);
List<String> names = factory.getElementNames();
Collections.sort(names);
wServiceName.setItems(names.toArray(new String[names.size()]));
} catch(MetaStoreException e) {
LogChannel.GENERAL.logError("Error reading streaming service names from the metastore", e);
}
wServiceName.setText( Const.NVL(input.getServiceName(), ""));
wIdField.setText(Const.NVL(input.getIdField(), ""));
wTimeStampField.setText(Const.NVL(input.getTimestampField(), ""));
String[] slaves = transMeta.getSlaveServerNames();
Arrays.sort(slaves);
wSlaveServer.setItems(slaves);
wSlaveServer.setText(Const.NVL(input.getSlaveServer(), ""));
wStepname.selectAll();
wStepname.setFocus();
}
示例2: EditRowsDialog
import org.pentaho.di.core.logging.LogChannel; //导入依赖的package包/类
public EditRowsDialog( Shell parent, int style,
String title, String message, RowMetaInterface rowMeta, List<Object[]> rowBuffer ) {
this.title = title;
this.message = message;
this.rowBuffer = rowBuffer;
this.rowMeta = rowMeta;
this.parentShell = parent;
this.style = ( style != SWT.None ) ? style : this.style;
props = PropsUI.getInstance();
bounds = null;
hscroll = -1;
vscroll = -1;
title = null;
message = null;
this.log = LogChannel.GENERAL;
}
示例3: getOperation
import org.pentaho.di.core.logging.LogChannel; //导入依赖的package包/类
/**
* Find the specified operation in the WSDL definition.
*
* @param operationName Name of operation to find.
* @return A WsdlOperation instance, null if operation can not be found in WSDL.
*/
public WsdlOperation getOperation(String operationName) throws KettleStepException {
// is the operation in the cache?
if (_operationCache.containsKey(operationName)) {
return (WsdlOperation) _operationCache.get(operationName);
}
Binding b = _port.getBinding();
PortType pt = b.getPortType();
Operation op = pt.getOperation(operationName, null, null);
if (op != null) {
try {
WsdlOperation wop = new WsdlOperation(b, op, _wsdlTypes);
// cache the operation
_operationCache.put(operationName, wop);
return wop;
}
catch (KettleException kse) {
LogChannel.GENERAL.logError("Could not retrieve WSDL Operator for operation name: "+operationName);
throw new KettleStepException("Could not retrieve WSDL Operator for operation name: "+operationName, kse);
}
}
return null;
}
示例4: addToolBar
import org.pentaho.di.core.logging.LogChannel; //导入依赖的package包/类
private void addToolBar() {
try {
XulLoader loader = new SwtXulLoader();
loader.setSettingsManager(XulSpoonSettingsManager.getInstance());
ResourceBundle bundle = new XulSpoonResourceBundle(Spoon.class);
XulDomContainer xulDomContainer = loader.loadXul(XUL_FILE_TOOLBAR, bundle);
xulDomContainer.addEventHandler(this);
toolbar = (XulToolbar) xulDomContainer.getDocumentRoot().getElementById("import-rules-toolbar"); //$NON-NLS-1$
ToolBar swtToolbar = (ToolBar) toolbar.getManagedObject();
swtToolbar.layout(true, true);
} catch (Throwable t) {
LogChannel.GENERAL.logError(Const.getStackTracker(t));
new ErrorDialog(shell,
BaseMessages.getString(PKG, "ImportRulesDialog.Exception.ErrorReadingXULFile.Title"), //$NON-NLS-1$
BaseMessages.getString(PKG, "ImportRulesDialog.Exception.ErrorReadingXULFile.Message", XUL_FILE_TOOLBAR), new Exception(t)); //$NON-NLS-1$
}
}
示例5: TextFileCSVImportProgressDialog
import org.pentaho.di.core.logging.LogChannel; //导入依赖的package包/类
/**
* Creates a new dialog that will handle the wait while we're finding out what tables, views etc we can reach in the
* database.
*/
public TextFileCSVImportProgressDialog(Shell shell, InputFileMetaInterface meta, TransMeta transMeta, InputStreamReader reader, int samples, boolean replaceMeta )
{
this.shell = shell;
this.meta = meta;
this.reader = reader;
this.samples = samples;
this.replaceMeta = replaceMeta;
this.transMeta = transMeta;
message = null;
debug = "init";
rownumber = 1L;
this.log = new LogChannel(transMeta);
this.encodingType = EncodingType.guessEncodingType(reader.getEncoding());
}
示例6: BaseStepXulDialog
import org.pentaho.di.core.logging.LogChannel; //导入依赖的package包/类
public BaseStepXulDialog( String xulFile, Shell parent, BaseStepMeta baseStepMeta, TransMeta transMeta, String stepname ) {
this.log = new LogChannel(baseStepMeta);
this.transMeta = transMeta;
this.stepname = stepname;
this.stepMeta = transMeta.findStep(stepname);
this.baseStepMeta = baseStepMeta;
this.backupChanged = baseStepMeta.hasChanged();
this.props = PropsUI.getInstance();
this.xulFile = xulFile;
this.parentShell = parent;
try {
initializeXul();
} catch (Exception e) {
e.printStackTrace();
log.logError("Error initializing ("+stepname+") step dialog", e);
throw new IllegalStateException("Cannot load dialog due to error in initialization", e);
}
}
示例7: PreviewRowsDialog
import org.pentaho.di.core.logging.LogChannel; //导入依赖的package包/类
public PreviewRowsDialog(Shell parent, VariableSpace space, int style, String stepName, RowMetaInterface rowMeta,
List<Object[]> rowBuffer, String loggingText) {
this.stepname = stepName;
this.buffer = rowBuffer;
this.loggingText = loggingText;
this.rowMeta = rowMeta;
this.variables = space;
this.parentShell = parent;
this.style = (style != SWT.None) ? style : this.style;
this.dialogClosedListeners=new ArrayList<DialogClosedListener>();
props = PropsUI.getInstance();
bounds = null;
hscroll = -1;
vscroll = -1;
title = null;
message = null;
this.log = new LogChannel("Row Preview");
}
示例8: DatabaseExplorerDialogLegacy
import org.pentaho.di.core.logging.LogChannel; //导入依赖的package包/类
public DatabaseExplorerDialogLegacy(Shell parent, int style, DatabaseMeta conn, List<DatabaseMeta> databases, boolean look, boolean splitSchemaAndTable)
{
super(parent, style);
this.parent = parent;
this.dbMeta=conn;
this.databases = databases;
this.justLook=look;
this.splitSchemaAndTable = splitSchemaAndTable;
selectedSchema=null;
selectedTable=null;
props=PropsUI.getInstance();
log=new LogChannel("DBExplorer");
dbcache = DBCache.getInstance();
}
示例9: main
import org.pentaho.di.core.logging.LogChannel; //导入依赖的package包/类
public static void main(String[] args)
{
Display display = new Display();
LogChannelInterface log = new LogChannel(APP_NAME);
PropsUI.init(display, Props.TYPE_PROPERTIES_SPOON);
Translator translator = new Translator(display);
translator.open();
try
{
while (!display.isDisposed ())
{
if (!display.readAndDispatch()) display.sleep ();
}
}
catch(Throwable e)
{
log.logError("An unexpected error occurred : "+e.getMessage());
log.logError(Const.getStackTracker(e));
}
}
示例10: main
import org.pentaho.di.core.logging.LogChannel; //导入依赖的package包/类
public static void main(String[] args) throws Exception
{
Display display = new Display();
LogChannelInterface log = new LogChannel(APP_NAME);
PropsUI.init(display, Props.TYPE_PROPERTIES_SPOON);
Translator2 translator = new Translator2(display);
translator.loadConfiguration();
translator.open();
try
{
while (!display.isDisposed ())
{
if (!display.readAndDispatch()) display.sleep ();
}
}
catch(Throwable e)
{
log.logError(BaseMessages.getString(PKG, "i18n.UnexpectedError",e.getMessage()));
log.logError(Const.getStackTracker(e));
}
}
示例11: SlaveServer
import org.pentaho.di.core.logging.LogChannel; //导入依赖的package包/类
public SlaveServer(String name, String hostname, String port, String username, String password, String proxyHostname, String proxyPort, String nonProxyHosts, boolean master)
{
this();
this.name = name;
this.hostname = hostname;
this.port = port;
this.username = username;
this.password = password;
this.proxyHostname = proxyHostname;
this.proxyPort = proxyPort;
this.nonProxyHosts = nonProxyHosts;
this.master = master;
initializeVariablesFrom(null);
this.log = new LogChannel(this);
}
示例12: Database
import org.pentaho.di.core.logging.LogChannel; //导入依赖的package包/类
/**
* Construct a new Database Connection
* @param databaseMeta The Database Connection Info to construct the connection with.
* @deprecated Please specify the parent object so that we can see which object is initiating a database connection
*/
public Database(DatabaseMeta databaseMeta)
{
this.parentLoggingObject = null;
this.databaseMeta = databaseMeta;
shareVariablesWith(databaseMeta);
// In this case we don't have the parent object, so we don't know which object makes the connection.
// We also don't know what log level to attach to it, so we have to stick to the default
// As such, this constructor is @deprecated.
//
log=new LogChannel(this);
logLevel = log.getLogLevel();
containerObjectId = log.getContainerObjectId();
pstmt = null;
rowMeta = null;
dbmd = null;
rowlimit=0;
written=0;
if(log.isDetailed()) log.logDetailed("New database connection defined");
}
示例13: createUrlClassLoader
import org.pentaho.di.core.logging.LogChannel; //导入依赖的package包/类
/**
* Create a new URL class loader with the jar file specified. Also include all the jar files in the lib folder next to that file.
*
* @param jarFileUrl The jar file to include
* @param classLoader the parent class loader to use
* @return The URL class loader
*/
protected URLClassLoader createUrlClassLoader(URL jarFileUrl, ClassLoader classLoader) {
List<URL> urls = new ArrayList<URL>();
// Also append all the files in the underlying lib folder if it exists...
//
try {
String libFolderName = new File(URLDecoder.decode(jarFileUrl.getFile(), "UTF-8")).getParent()+"/lib";
if (new File(libFolderName).exists()) {
PluginFolder pluginFolder = new PluginFolder(libFolderName, false, true, searchLibDir);
FileObject[] libFiles = pluginFolder.findJarFiles(true);
for (FileObject libFile : libFiles) {
urls.add(libFile.getURL());
}
}
} catch(Exception e) {
LogChannel.GENERAL.logError("Unexpected error searching for jar files in lib/ folder next to '"+jarFileUrl+"'", e);
}
urls.add(jarFileUrl);
return new KettleURLClassLoader(urls.toArray(new URL[urls.size()]), classLoader);
}
示例14: start
import org.pentaho.di.core.logging.LogChannel; //导入依赖的package包/类
public void start() {
// We store the UI thread for the getDisplay() method
setBlockOnOpen( false );
try {
open();
checkEnvironment();
ExtensionPointHandler.callExtensionPoint( log, KettleExtensionPoint.SpoonStart.id, commandLineOptions );
// Load the last loaded files
loadLastUsedFiles();
waitForDispose();
// runEventLoop2(getShell());
} catch ( Throwable e ) {
LogChannel.GENERAL.logError( "Error starting Spoon shell", e );
}
System.out.println( "stopping" );
}
示例15: selectRepositoryObject
import org.pentaho.di.core.logging.LogChannel; //导入依赖的package包/类
public static RepositoryObject selectRepositoryObject( String filter, LogChannel log ) {
try {
FileDialogOperation fileDialogOperation =
new FileDialogOperation( FileDialogOperation.OPEN, FileDialogOperation.ORIGIN_OTHER );
if ( !Utils.isEmpty( filter ) ) {
fileDialogOperation.setFilter( filter );
}
ExtensionPointHandler.callExtensionPoint( log, KettleExtensionPoint.SpoonOpenSaveRepository.id,
fileDialogOperation );
return (RepositoryObject) fileDialogOperation.getRepositoryObject();
} catch ( KettleException ke ) {
// Ignore
}
return null;
}