Trouble using the real time TCP logging feature


Author
Message
Antisoci@l
Antisoci@l
New Member (10 reputation)New Member (10 reputation)New Member (10 reputation)New Member (10 reputation)New Member (10 reputation)New Member (10 reputation)New Member (10 reputation)New Member (10 reputation)New Member (10 reputation)
Group: Forum Members
Posts: 2, Visits: 18
Dear LogViewPlus Support and Community,

We are testing out the software. We would like a fast off-line real time local log viewer running on the window system. I believe the implemented TCP and UDP data source feature is for this purpose.

I wrote some code with NLog constantly writing logs to "tcp://localhost:4505". However, I am having trouble to let the LogViewPlus software to pick up my log real time when I am running my program.

Here is my NLog Configuration File:


Here is the simple Program.cs logging the message to port 4505:


While I am running the program, I am struggling to let the LogViewPlus app to pick up the real time log.

Here is what I have in the LogViewPlus setting:


I have also taken a look at the frequently asked questions, I made sure the app is not blocked by window. I right clicked on the exe and into property to make sure of that. I am also able to view nlog files stored in the drive using LogViewPlus. However, just have not gotten the TCP real time feature to work for me yet.

I would like to have it eventually set up when my app runs, the embedded logs in my app will constantly be sent to localhost port 4505, but only when I want to view the logs if some processes went wrong, I could open up LogViewPlus to diagnose real time on what processes my app is going through and able to Trace or Debug.

UDP might be fine as well (prefer to go with TCP), but I have not given UDP a try yet.

Any help is appreciated! Thank you in advance!


Sincerely,
Antisoic@l
LogViewPlus Support
LogViewPlus Support
Supreme Being (6.1K reputation)Supreme Being (6.1K reputation)Supreme Being (6.1K reputation)Supreme Being (6.1K reputation)Supreme Being (6.1K reputation)Supreme Being (6.1K reputation)Supreme Being (6.1K reputation)Supreme Being (6.1K reputation)Supreme Being (6.1K reputation)
Group: Moderators
Posts: 1.1K, Visits: 3.8K
Hi,

It looks like your have configured the server correctly in LogViewPlus. It can be difficult to debug this type of issue without more information.  Are you getting a specific error message?  Have you confirmed your application is writing data correctly?

If you are new to LogViewPlus, it may be difficult to know how the pieces work together, so let me quickly show you how I configure LVP on my machine for a TCP connection. 

First the basics, which I can see you have already done above.  Add the new server and make sure to test it to confirm the connection works:



After this is setup, you should see your TCP connection listed in the file explorer:



You can just double click on that connection to open it.

At this point, LogViewPlus will start listening on the TCP connection and write anything that is written to a local file in a subdirectory in %Temp%\LogViewPlus.  Once something is written to the file, LogViewPlus will try to open it just like any other local log file.  This will give you an opportunity to set a parser configuration. 



If nothing is being written, there may be a log pause or the file may not be opened (depending on the version).  You should still see the connection open in the File Transfers view at the bottom:



Hope that helps,

Toby




Antisoci@l
Antisoci@l
New Member (10 reputation)New Member (10 reputation)New Member (10 reputation)New Member (10 reputation)New Member (10 reputation)New Member (10 reputation)New Member (10 reputation)New Member (10 reputation)New Member (10 reputation)
Group: Forum Members
Posts: 2, Visits: 18
Dear Toby,

Thanks for the reply! I will try to be more detailed and walk you through my process.

First, I deleted the TCP connection that I currently have. Then, closed LogViewPlus. Then, I reopened LogViewPlus. (I made a slight modification to my program now):



While I am running my program, I reset up the localhost port 4505 connection. Successfully set that up, and then clicked open file, then clicked on the TCP connection that you said to click in your reply post. Then I got to this page:



It says on the bottom left, with target localhost_4505 and progress Monitoring... No error message is shown.

However, I am not seeing any messages that is showing up. After my program finished running after 50s, still nothing is showing up on the LogViewPlus screen. So, I run my program again and waited another 50s until ending, still nothing popping up on this page.

I made sure that things are actually being wrote to localhost 4505 by using another real time log viewer:



As a result, I don't think my program using NLog has trouble writing to localhost 4505.

I do have a couple questions after reading your post. What is the designed behavior of LogViewPlus, does it have the feature of receiving TCP messages real time and put the message on its window real time, or does it only have the ability to listen to TCP messages real time and write to a file, only after the writing process is ended it can open up the entire log file at once not real time as the messages are sending?

In addition, do you suspect any compatibility issue is there based on the logger that I am using? NLog in this case.

Since nothing is being written, I checked your post again, I am quite sure that I am in the File Transfers view at the bottom:



In addition, I went to my C:\Temp folder, I did not see a LogViewPlus sub folder. I am still stuck on getting the TCP to work.

Any help is appreciated! Thank you in advance!


Sincerely,
Antisoci@l
LogViewPlus Support
LogViewPlus Support
Supreme Being (6.1K reputation)Supreme Being (6.1K reputation)Supreme Being (6.1K reputation)Supreme Being (6.1K reputation)Supreme Being (6.1K reputation)Supreme Being (6.1K reputation)Supreme Being (6.1K reputation)Supreme Being (6.1K reputation)Supreme Being (6.1K reputation)
Group: Moderators
Posts: 1.1K, Visits: 3.8K
Hi,

When monitoring a network connection, LogViewPlus will write messages to the temporary log file as soon as the messages are received.  Whatever we receive gets written exactly as we received it - byte for byte.  Once there is data in the log file, it can be opened.  The connection will then remain active and continue to write log message to the file as they are received.  There is no authentication mechanism, so the TCP service must not be secured.

The temporary directory is %Temp%\LogViewPlus - not C:\Temp, so I think you may have been looking in the wrong place.  LogViewPlus writes to your local temp directory by default.

The above configuration looks right as far as I can tell, so I would suggest it is an issue with your nLog configuration.  Unfortunately, I don't know much about nLog.  I can see in the configuration above that you are using the NLogViewer type.  Is that correct?  The nLog documentation seems to suggest this is a "specialized target", but doesn't discuss what that means or why it is needed.  

Hope that helps,

Toby





GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Login

Explore
Messages
Mentions
Search