DirectoryWatcherGateway
The DirectoryWatcherGateway event gateway
sends events to the listener CFC when a file is created, deleted, or
modified in a directory. The watcher runs in a thread that sleeps for
an interval specified in the configuration file, and when the interval
has passed, checks for changes since the last time it was awake. If it
finds added, deleted, or changed files, it sends a message to a
listener CFC. You can configure separate CFCs for add, delete, and
change events, or use a single CFC for all events. The source for this
event gateway is located in the gateway/src/examples/watcher
directory.
http://help.adobe.com/en_US/ColdFusion/10.0/Developing/WSc3ff6d0ea77859461172e0811cbec22c24-77f7.html
Once it's detected modified (by polling), then you can return the last x number of lines using tail
in Linux: https://stackoverflow.com/a/16375840/35634
Or Get-Content -tail
in Window's Powershell https://technet.microsoft.com/en-gb/library/hh849787.aspx
Lastly, you may use Sever Sent Event (essentially ajax long polling) or cfwebsocket (CF10 or above) to push the last x lines to the client.