Remember
Register
Home
/
Support
/
Support Forum
/
How to log from python?
Digi Forum
All Activity
Q&A
Questions
Hot!
Unanswered
Tags
Categories
Users
Ask a Question
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.
All categories
Digi Remote Manager
(383)
Python
(1,016)
3rd Party Python and API development in other Languages
(265)
RF Solutions and XBee
(8,413)
Digi TransPort
(785)
Digi Connect Cellular
(443)
DAL
(4)
Embedded Devices
(4,160)
Google Coral
(2)
Rabbit
(3,194)
Console Servers
(353)
Modbus and Industrial Automation
(246)
Realport
(600)
Serial Servers
(836)
Satellite Modules
(25)
USB
(1,269)
Serial Cards
(715)
ConnectPort Display
(58)
Feedback/Wish List
(92)
Other/Legacy
(373)
How to log from python?
0
votes
Hi. What logging options are available for python scripts on a Transport WR41 gateway? Is there any way to log to the device's main event log?
Thanks!
transport
logging
asked
Jun 9, 2015
in
Python
by
aragon
New to the Community
(
2
points)
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
2 Answers
0
votes
It depends what you are trying to achieve...
from BaseWizard import write_cli
eventlog = write_cli ("type eventlog.txt")
print eventlog
or you could do
eventlog = open("/eventlog.txt")
eventlog_contents = eventlog.read()
print (eventlog_contents)
answered
Jun 9, 2015
by
NicholasWilson
Veteran of the Digi Community
(
1,003
points)
Please
log in
or
register
to add a comment.
0
votes
I read it the other way around.
To write to the event log:
from BaseWizard import write_cli
eventlog =write_cli('setevent "this is a test"')
answered
Jun 9, 2015
by
NicholasWilson
Veteran of the Digi Community
(
1,003
points)
Please
log in
or
register
to add a comment.
...