塔林常见日志 [英] Common Logging in Talend

查看:118
本文介绍了塔林常见日志的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在Talend中实现日志记录.因此,我使用常规组件进行了工作,并记录了错误,信息和通过Twarn和Tdie进行的调试. 使用Logcatcher,我将日志分为两个调试和错误文件. 这部分工作正常.

现在我做了两个工作,

首先:-使用trowgenerator生成行,然后发送到tmap和从tmap发送,我将根据某些条件发送到两个twarn组件.

第二个:-一项作业,其中包含tlogcatcher,t_filterrow并根据某些条件将其隔离为两个文件.

因此,我正在与第二项作业并行运行第二项作业以捕获日志,但是它无法正常工作.

我已经尝试了几种选择,并停留在这一点上.

主要思想是拥有一个通用的日志记录组件,可以将其插入任何作业以获取日志.

有什么方法可以实现?

解决方案

以下是弹出的三种方式:

log4j:企业版内置了log4j,这意味着您可以在tWarn/tDie中设置调试级别并配置log4j以将它们放入不同的文件中. (使用它时,我发现最好将警告作为自己的信息级别日志,因为talends的信息级别太深了.) 我确信log4j也会成为开放工作室的黑客".那将解决您的问题.搜索log4j时, https://exchange.talend.com 有很多结果,您应该看一下./p>

joblet::如果您更喜欢当前的方式,我会为您提供2种选择.首先是尝试创建一个Joblet,但是从多个作业中使用同一文件不是一个好主意,并且可能会导致错误.这不是一个很好的解决方案,但是如果我们只谈论一项需要产生2个文件的工作,那么它可能会起作用.

项目级别日志记录::您可以尝试启用项目级别日志记录,但这会将所有内容记录到文件中.基本上,这意味着将logcatcher输出重定向到文件.多数民众赞成在1文件不是2,但至少它可以工作. https://help.talend.com/display/TalendOpenStudioforBigDataUserGuide520EN/2.6+ Customizing + project + settings (统计和日志)

对于您所需要的,确实没有很好的解决方案.

I was trying to implement logging in Talend. So I made a job using normal components, I have recorded the error, info and debug through Twarn and Tdie. Using Logcatcher , I am segregating the log into two files of debug and error. This part is working fine.

Now I have made two jobs,

First:- Using trowgenerator generating lines, then sending to tmap and from tmap, I am sending to two twarn components based on some condition.

Second:- A job which has tlogcatcher, t_filterrow and segregating to two files based on some condition.

So I am running the second job in parallel with the first job to capture the logs, but it is not working.

I have tried several options and stuck at this point.

Main idea is to have a common logging component which can be plugged to any job for the logs.

Is there any ways with which it can be achieved ?

解决方案

Here are the 3 ways that popped in:

log4j: Enterprise version has log4j built in, which means you can set a debug level in tWarn/tDie and configure log4j to put these into different files. (When using it I found it best to have the warnings as my own info level log, since talends info level is too deep.) I'm sure log4j can be an "hacked" into open studio as well. That would solve your problem. https://exchange.talend.com has many results when searching for log4j, you should take a look.

joblet: If you prefer your current way I see 2 options, for you. First is to try and do create a joblet, however using the same file from multiple jobs is not a good idea and probably results in errors. This is not a nice solution but could work if we only talk about 1 job that needs to produce 2 files.

Project level logging: You can try to enable project level logging but that logs everything into files. It basically means redirect the logcatcher output to a file. Thats 1 file not 2, but at least it works. https://help.talend.com/display/TalendOpenStudioforBigDataUserGuide520EN/2.6+Customizing+project+settings (Stats & Logs)

There really is no nice solution to what you need.

这篇关于塔林常见日志的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆