aspirinemaga
aspirinemaga

Reputation: 3937

WAMP show logs in realtime in console

I'am using the WAMPServer, and it's located in d:/wamp/. Is there a way to show logging window or console in realtime as I'am crawling on my server web ?

Upvotes: 1

Views: 1482

Answers (2)

theking2
theking2

Reputation: 2803

Follow with PowerShell

The PowerShell command to follow a file is Get-Content -Wait <filepath>

Settings

I've added these settings to the Windows Terminal settings.json

{
   "commandline": "%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -c \"Get-Content -Wait c:\\wamp\\logs\\php_error.log",
   "font": 
   {
      "cellHeight": "1.1",
      "face": "Cascadia Mono",
      "size": 7.0
   },

   "name": "Follow php_error",
   "padding": "8, 8, 8, 8",
   "snapOnInput": true,
   "startingDirectory": "c:\\wamp"
}

Why a small font? because Windows Terminal wraps long lines and will not change to do so in the near future

Upvotes: 0

LeonardChallis
LeonardChallis

Reputation: 7783

On unix/linux boxes I tend to use the tail command to watch logs as I browse for debugging. Of course, Windows has no equivalent, but there are a few options. The one I settled with was mTAIL. It's a standalone app and not a command line program, but it does exactly what you'd expect:

mTAIL at work

I was going to suggest using unxtools, a suite of ported GNU tools that can be used on the command line, but it's out of date and trying it on more recent versions of Windows I had problems. You can download them from sourceforge if you want to take a look. Also tail for Windows, is another Windows app that unfortunately doesn't seem to work on later versions, but included here in case it saves anyone the time looking.

Of course, you may find that if you prefer the command line you want to look at getting cygwin installed, which contains a host of commands you could use for the task you have.

Upvotes: 1

Related Questions