Skip to content

faustobranco/java_WatchLogFile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java Watch Live Log Files

Github All Releases

Java example to watch live 2/n log files using threads

Getting Started

The project, done in Java 8 using IntelliJ 2019.3 and Maven, simply shows examples of using org.apache.commons.io for log watch only for reference: The logs files in this example are in /logs.

This example shows very simply how to watch at two live log files in threads and show their update (together) in the console.

Maven:

    <dependencies>  
        <dependency> 
            <groupId>commons-io</groupId>  
            <artifactId>commons-io</artifactId>  
            <version>2.6</version>  
        </dependency> 
    </dependencies>
    <build>  
       <plugins> 
            <plugin> 
                <groupId>org.apache.maven.plugins</groupId>  
                <artifactId>maven-compiler-plugin</artifactId>  
                <configuration> 
                    <source>1.8</source>  
                    <target>1.8</target>  
                </configuration> 
            </plugin> 
        </plugins>
   </build>

Log Files

Location: /logs/app.log and /logs/debug.log

Authors

About

Java example to watch live 2/n log files using threads

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages