Alternative to DebugView

167 views
Skip to first unread message

Eric Lendvai

unread,
Feb 10, 2021, 6:23:34 AM2/10/21
to Harbour Users

I use Windows DebugView all the time to monitor errors and help debug services and libraries. DebugView is a great solution when an issue is not critical, but a developer should be made aware of, or when some QA staff can help you trace down issues in a program.
But DebugView is only for Windows.
On Linux system I had to write to log files. But that will slow down execution and you have to deal with cleaning up those log files.
Does anyone have another solution for under Linux? Maybe some sort of socket based communication and a local client that behaves like DebugView?

Francesco Perillo

unread,
Feb 10, 2021, 3:27:11 PM2/10/21
to harbou...@googlegroups.com
In linux we should use the syslog...

I don't remember if it is already supported...

--
--
You received this message because you are subscribed to the Google
Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: http://groups.google.com/group/harbour-users

---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/harbour-users/5f710521-1965-414b-a4f5-aea135a045d0n%40googlegroups.com.

Francesco Perillo

unread,
Feb 10, 2021, 3:31:33 PM2/10/21
to harbou...@googlegroups.com
Yes it is. The good stuff with syslog is that if you use rsyslog you can forward the log to a central server. I'd like to implement sending messages to a remote syslog server from windows...

Anyway, from harbour sources

a:/usr/local/src/harbour/contrib # grep -i -r syslog *
Binary file hbrun/hbrun matches
xhb/xhb.hbp:hbsyslog.c
xhb/hblog.prg: * Syslog channel - a wrapper for the low level
xhb/hblog.prg: * C interface to syslog/ event log system
xhb/hblog.prg:CREATE CLASS HB_LogSysLog FROM HB_LogChannel
xhb/hblog.prg:METHOD New( nLevel, nId ) CLASS HB_LogSysLog
xhb/hblog.prg:METHOD Open( cName ) CLASS HB_LogSysLog
xhb/hblog.prg:   IF hb_SysLogOpen( cName )
xhb/hblog.prg:METHOD close( cName ) CLASS HB_LogSysLog
xhb/hblog.prg:   IF hb_SysLogClose( cName )
xhb/hblog.prg:METHOD Send( nType, cMessage, cName, nPriority ) CLASS HB_LogSysLog
xhb/hblog.prg:   // Syslog does not need timestamp, nor priority
xhb/hblog.prg:   RETURN hb_SysLogMessage( ::Format( HB_LOG_ST_LEVEL, cMessage, cName, nPriority ), nPriority, ::nId )
xhb/hblog.ch:   [<sys: SYSLOG> ([<nSysPrio>[,<nSysId>]])] ;
xhb/hblog.ch:      hb_StandardLogAdd( HB_LogSysLog():New( <nSysPrio>, <nSysId> ));;
xhb/xhb.hbx:DYNAMIC HB_LogSysLog
xhb/xhb.hbx:DYNAMIC hb_SysLogClose
xhb/xhb.hbx:DYNAMIC hb_SysLogMessage
xhb/xhb.hbx:DYNAMIC hb_SysLogOpen
xhb/hbsyslog.c:#  include <syslog.h>
xhb/hbsyslog.c:HB_FUNC( HB_SYSLOGOPEN )
xhb/hbsyslog.c:HB_FUNC( HB_SYSLOGCLOSE )
xhb/hbsyslog.c:HB_FUNC( HB_SYSLOGMESSAGE )
xhb/hbsyslog.c:   syslog( logval, "[%lX]: %s", hb_parnl( 3 ), hb_parcx( 1 ) );
a:/usr/local/src/harbour/contrib # cd ../src/
a:/usr/local/src/harbour/src # grep -i -r syslog *| more
common/hbtrace.c:   #include <syslog.h>
common/hbtrace.c:            syslog( slevel, "%s:%d:%s() %s %s", file, line, proc,
common/hbtrace.c:            syslog( slevel, "%s:%d: %s %s", file, line, pszLevel, message );
Binary file common/obj/linux/gcc/hbtrace_dyn.o matches
Binary file common/obj/linux/gcc/hbtrace.o matches
Reply all
Reply to author
Forward
0 new messages