官术网_书友最值得收藏!

Editing the logfiles

When the logfiles are set up and are accepting the messages, the next step is to see what is logged into the logfiles. This recipe will show you how to efficiently edit the logfiles. For example, we need to edit the logfiles in case we diagnose a problem and we need to send an excerpt of the logs to the support center. We also need to edit the logfiles when we search for some particular line of log.

How to do it…

All the logging made in Oracle SOA Suite is somehow file-based, except the console logger:

  1. In order to edit a logfile, we first have to identify the location of the logfile.
    Tip

    We can find the location of logfiles in the Oracle Enterprise Manager Console.

  2. When we find the location, we can use the Windows native editors such as Notepad and WordPad or some freeware editors such as PSPad and Notepad++.
    notepad AdminServer-diagnostic.log
    Tip

    The PSPad editor can be downloaded from the following URL:

    http://www.pspad.com/

    Notepad++ can be downloaded from the following URL:

    http://notepad-plus-plus.org/

  3. When the logfiles are open, you can browse for the information you are looking for. However, note that editing is meant in a sense of viewing and searching and not changing the content of a logfile.

There's more…

In time, the number of logfiles will grow and can easily exceed several hundred Megabytes. In situations where we deal with big logfiles, we need a different approach in the editing logfiles. One utility worth mentioning is tail. For UNIX systems, this is a standard utility.

For Windows systems, there is a port project that you can find at http://sourceforge.net/projects/tailforwin32/?source=dlp.

Another utility called Bare Tail can also be used, and it can be found at http://www.baremetalsoft.com/baretail/.

To edit the logfile with the tail utility, issue the following command:

<tail_install_dir>\Tail.exe -f AdminServer-diagnostic.log

We get the window of tail with the logfile edited. New messages are coming in at the bottom of the logfile as shown in the following screenshot:

See also

To view the content of the logfiles from the Oracle Enterprise Manager Console, refer to the next recipe, Viewing logfiles in the Enterprise Manager Console.

主站蜘蛛池模板: 东台市| 大埔县| 英吉沙县| 淮阳县| 秭归县| 清流县| 洪泽县| 柞水县| 丁青县| 怀集县| 阳西县| 武汉市| 嘉定区| 米林县| 萨嘎县| 娄底市| 即墨市| 凤城市| 措勤县| 曲周县| 荆门市| 开远市| 云龙县| 临汾市| 聂荣县| 朝阳区| 鄄城县| 体育| 汕尾市| 青海省| 久治县| 博湖县| 玉环县| 台山市| 定兴县| 宁河县| 习水县| 衡阳市| 景洪市| 嘉鱼县| 铜川市|