Skip to content

Commit

Permalink
Fix typo on README.md fix jenkinsci#33 jenkinsci#32 jenkinsci#35
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyrille Le Clerc authored Jun 11, 2019
1 parent 41e0120 commit 4c16653
Showing 1 changed file with 31 additions and 2 deletions.
33 changes: 31 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ Add the following dependency in your pom.xml:
## Sample UDP sender using RFC 3164

```java
import com.cloudbees.syslog.Facility;
import com.cloudbees.syslog.MessageFormat;
import com.cloudbees.syslog.Severity;
import com.cloudbees.syslog.sender.UdpSyslogMessageSender;

...

// Initialise sender
UdpSyslogMessageSender messageSender = new UdpSyslogMessageSender();
Expand All @@ -41,17 +47,22 @@ messageSender.setSyslogServerHostname("127.0.0.1");
messageSender.setSyslogServerPort(514);
messageSender.setMessageFormat(MessageFormat.RFC_3164); // optional, default is RFC 3164


// send a Syslog message
messageSender.sendMessage("This is a test message");
```

## Sample UDP sender using RFC 5424

```java
import com.cloudbees.syslog.Facility;
import com.cloudbees.syslog.MessageFormat;
import com.cloudbees.syslog.Severity;
import com.cloudbees.syslog.sender.UdpSyslogMessageSender;

...

// Initialise sender
SyslogMessageUdpSender messageSender = new SyslogMessageUdpSender();
UdpSyslogMessageSender messageSender = new UdpSyslogMessageSender();
messageSender.setDefaultMessageHostname("myhostname"); // some syslog cloud services may use this field to transmit a secret key
messageSender.setDefaultAppName("myapp");
messageSender.setDefaultFacility(Facility.USER);
Expand All @@ -67,6 +78,12 @@ messageSender.sendMessage("This is a test message");
## Sample TCP sender using RFC 3164

```java
import com.cloudbees.syslog.Facility;
import com.cloudbees.syslog.MessageFormat;
import com.cloudbees.syslog.Severity;
import com.cloudbees.syslog.sender.TcpSyslogMessageSender;

...

// Initialise sender
TcpSyslogMessageSender messageSender = new TcpSyslogMessageSender();
Expand All @@ -86,6 +103,12 @@ messageSender.sendMessage("This is a test message");
## Sample TCP over SSL sender using RFC 3164

```java
import com.cloudbees.syslog.Facility;
import com.cloudbees.syslog.MessageFormat;
import com.cloudbees.syslog.Severity;
import com.cloudbees.syslog.sender.TcpSyslogMessageSender;

...

// Initialise sender
TcpSyslogMessageSender messageSender = new TcpSyslogMessageSender();
Expand All @@ -105,6 +128,12 @@ messageSender.sendMessage("This is a test message");
## Sample TCP over SSL sender using RFC 5425

```java
import com.cloudbees.syslog.Facility;
import com.cloudbees.syslog.MessageFormat;
import com.cloudbees.syslog.Severity;
import com.cloudbees.syslog.sender.TcpSyslogMessageSender;

...

// Initialise sender
TcpSyslogMessageSender messageSender = new TcpSyslogMessageSender();
Expand Down

0 comments on commit 4c16653

Please sign in to comment.