syslog

What does the GCC error message, “Error: unsupported for `mov'”, mean?

别来无恙 提交于 2019-12-09 00:02:28
问题 I am just trying to compile some simple example code I typed in from a book, and GCC gives me the above error. Here's my code: $ cat -n test.cpp 1 #define READ_COMMAND 3 2 3 #define MSG_LENGTH 128 4 5 #include <stdlib.h> 6 #include <stdio.h> 7 8 int main(int argc, char *arg[]) 9 { 10 int syslog_command = READ_COMMAND; 11 int bytes_to_read = MSG_LENGTH; 12 int retval; 13 char buffer[MSG_LENGTH]; 14 15 asm volatile( 16 "movl %1, %%ebx\n\t" 17 "movl %2, %%ecx\n\t" 18 "movl %3, %%edx\n\t" 19

iOS - How to view NSLog and printf output in ssh session on phone?

寵の児 提交于 2019-12-08 13:42:55
问题 I have a simple iPhone App that uses an NSLog and several printf statements. The app is a simple test app that I created to test serial communication on the iPhone (3GS). Obviously I can not test serial com with the iOS Simulator, so I have my device unplugged from the computer after I click Run from within Xcode. I installed syslogd from Cydia, and tail /var/log/syslog allows me to monitor certain log messages. However when I open my app and it reaches the NSLog portion of the code I don't

Python's SyslogHandler and TCP

纵饮孤独 提交于 2019-12-06 08:53:18
问题 I'm trying to understand why the SyslogHandler class from Python's logging framework (logging.handlers) does not implement any of the framing mechanism described by RFC 6587: Octet Counting : it "prepends" the message length to the syslog frame: Non-Transparent-Framing : a trailer character to separate messages. This is what most of the servers understand. This "problem" can be easily solved by adding a LF character to the end of the messages, however I would expect that the SyslogHandler

how to parse syslog timestamp

∥☆過路亽.° 提交于 2019-12-06 04:39:30
问题 http://www.syslog.cc/ietf/drafts/draft-ietf-syslog-protocol-23.txt 6.2.3.1. Examples in the above link provides examples of different timestamp formates. How can I parse these timestamps in C ? On-the-fly, any type of message can arrive and I want to be able to parse it. 回答1: The date format is a stricter version of RFC3339 giving a string such as '2011-08-18T23:31:42Z' I'm not certain the strptime function can deal with the timezone specifier (Z in the time string above), so it may be easier

Glassfish to Syslog

房东的猫 提交于 2019-12-06 03:17:42
I'm struggling to make Glassfish 3.1.1 to log to syslog, but I'm unable to. I don't know if it's a bug, but I don't even know how to debug it. First and obvious step: I checked the box on the administration console to write to system log, and after I also marked the checkbox write to system console. None of them worked. I checked the logging.properties and this line is there com.sun.enterprise.server.logging.SyslogHandler.useSystemLogging=true Googling I found a few people complaining with abandoned questions. Is there anything else I should do or I have to write a custom log handler to do

rsyslog日志服务

守給你的承諾、 提交于 2019-12-06 02:16:38
rsyslog简介 rsyslog是CentOS6和CentOS7默认的记录日志的服务 支持特性: UDP, TCP, SSL, TLS, RELP MySQL, PGSQL, Oracle实现日志存储 强大的过滤器,可实现过滤记录日志信息中任意部分 自定义输出格式 常见术语: facility:设施,从功能或程序上对日志进行归类: auth, authpriv, cron, daemon,ftp,kern, lpr, mail, news, security(auth), user, uucp, local0-local7, syslog Priority 优先级别,从低到高排序: debug, info, notice, warn(warning), err(error), crit(critical), alert, emerg(panic) 配置文件格式: /etc/rsyslog.conf 配置文件由三部分组成 MODULES:相关模块配置 GLOBAL DIRECTIVES:全局配置 RULES:日志记录相关的规则配置 RULES设置方式: facility : *: 所有的facility facility1,facility2,facility3,...:指定的facility列表 priority: *: 所有级别 none:没有级别,即不记录 PRIORITY

juniper syslog日志记录

自古美人都是妖i 提交于 2019-12-05 22:06:37
详细日志的关键字可以通过https://apps.juniper.net/syslog-explorer/查询 查询日志可通过命令show log XXX显示 ,其中XXX为文件名 set security log mode stream set security log report 为了记录日志发生时间的准确性,建议首先设置好ntp服务器 set system ntp server cn.pool.ntp.org 记录接口up down状态 set system syslog file interfaces-logs any any set system syslog file interfaces-logs match ifOperStatus VPN日志记录 set system syslog file kmd-logs daemon info set system syslog file kmd-logs match KMD 用户命令执行记录 set system syslog file interactive-commands interactive-commands any 用户认证记录(所有) set system syslog file auth.log authorization info 用户认证成功记录 set system syslog file auth

Using Syslog's unix socket with Log4J2

情到浓时终转凉″ 提交于 2019-12-05 20:31:20
问题 I would like to send the logs of an application on a rsyslog server using the client protocol : Unix socket. Both application and rsyslog server are on the same machine. I've been comparing different logging tools : Log4J, Logback and Log4J2. Log4J's Syslog appender doesn't permit it natively. A solution is to use Syslog4J and configure our Syslog4JAppender this way : <appender name="mySyslogAppender" class="org.productivity.java.syslog4j.impl.log4j.Syslog4jAppender"> <param name="protocol"

How can I use `syslog` in Swift

半世苍凉 提交于 2019-12-05 14:27:39
Looks like syslog() function is not available in Swift 2. How can I send a message to syslog on OS X? The problem is that void syslog(int priority, const char *message, ...); takes a variable argument list and is not imported to Swift. You can use void vsyslog(int priority, const char *message, va_list args); instead and define a wrapper function in Swift: func syslog(priority : Int32, _ message : String, _ args : CVarArgType...) { withVaList(args) { vsyslog(priority, message, $0) } } syslog(LOG_ERR, "i=%ld, x=%f", 123, 34.56) Note that string arguments have to be passed as C strings: syslog

What is the most modern way to log to syslog using a java.util.logging handler?

爷,独闯天下 提交于 2019-12-05 11:26:48
问题 I am specifically looking for the most up to date, modern SysLogHandler for java.util.logging . I have found a few that date back to 2001 - 2003, mostly un-supported now. I know that syslog is a pretty static service, I am wondering before I write something myself, if there are any newer handler implementations that support the Java 1.5 and newer features. I am not interested in any of the other logging frameworks or wrapper / proxy libraries. I am not looking for SLF4J or any other