Skip to content

Commit

Permalink
Minor refactoring and doc update.
Browse files Browse the repository at this point in the history
  • Loading branch information
goodsign committed May 14, 2014
1 parent 99fb812 commit d18b81e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions cfg_parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ const (
connWriterAddrAttr = "addr"
connWriterNetAttr = "net"
connWriterReconnectOnMsgAttr = "reconnectonmsg"
connWriterUseTLSAttr = "useTLS"
connWriterInsecureSkipVerifyAttr = "insecureSkipVerify"
connWriterUseTLSAttr = "tls"
connWriterInsecureSkipVerifyAttr = "insecureskipverify"
)

// CustomReceiverProducer is the signature of the function CfgParseParams needs to create
Expand Down
4 changes: 3 additions & 1 deletion doc.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2013 - Cloud Instruments Co., Ltd.
// Copyright (c) 2014 - Cloud Instruments Co., Ltd.
//
// All rights reserved.
//
Expand Down Expand Up @@ -32,6 +32,8 @@ To create a logger, use one of the following constructors:
func LoggerFromConfigAsFile
func LoggerFromConfigAsString
func LoggerFromWriterWithMinLevel
func LoggerFromWriterWithMinLevelAndFormat
func LoggerFromCustomReceiver (check https://github.com/cihub/seelog/wiki/Custom-receivers)
Example:
import log "github.com/cihub/seelog"
Expand Down
4 changes: 2 additions & 2 deletions writers_connwriter.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func (connWriter *connWriter) Close() error {
}

func (connWriter *connWriter) Write(bytes []byte) (n int, err error) {
if connWriter.neddedConnectOnMsg() {
if connWriter.neededConnectOnMsg() {
err = connWriter.connect()
if err != nil {
return 0, err
Expand Down Expand Up @@ -130,7 +130,7 @@ func (connWriter *connWriter) connect() error {
return nil
}

func (connWriter *connWriter) neddedConnectOnMsg() bool {
func (connWriter *connWriter) neededConnectOnMsg() bool {
if connWriter.reconnect {
connWriter.reconnect = false
return true
Expand Down

0 comments on commit d18b81e

Please sign in to comment.