Skip to content
This repository has been archived by the owner on Apr 2, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1260 from mozilla-services/syslog_timestamp_year
Browse files Browse the repository at this point in the history
Syslog timestamp must be calculated against current year and location.
  • Loading branch information
rafrombrc committed Jan 5, 2015
2 parents 4399c11 + 0e64db2 commit 8a4a6ed
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 6 deletions.
11 changes: 11 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
0.8.2 (2015-01-05)
==================

Bug Handling
------------

* Fix rsyslog sandbox decoder test to use current year and location for
timestamp parsing, since syslog timestamp format makes that assumption.

* Ensure that geoip_decoder is not included in release binaries.

0.8.1 (2014-12-17)
==================

Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ project(heka C)
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "High performance data gathering, analysis, monitoring, and reporting.")
set(CPACK_PACKAGE_VERSION_MAJOR 0)
set(CPACK_PACKAGE_VERSION_MINOR 8)
set(CPACK_PACKAGE_VERSION_PATCH 1)
set(CPACK_PACKAGE_VERSION_PATCH 2)
set(CPACK_PACKAGE_VENDOR "Mozilla")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE.txt")
set(CPACK_PACKAGE_CONTACT "[email protected]")
Expand Down
2 changes: 1 addition & 1 deletion cmd/hekad/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ import (
)

const (
VERSION = "0.8.1"
VERSION = "0.8.2"
)

func setGlobalConfigs(config *HekadConfig) (*pipeline.GlobalConfigStruct, string, string) {
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
# The short X.Y version.
version = '0.8'
# The full version, including alpha/beta/rc tags.
release = '0.8.1'
release = '0.8.2'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
15 changes: 12 additions & 3 deletions sandbox/plugins/sandbox_decoders_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package plugins

import (
"fmt"
"github.com/mozilla-services/heka/message"
"github.com/mozilla-services/heka/pipeline"
ts "github.com/mozilla-services/heka/pipeline/testsupport"
Expand All @@ -9,6 +10,7 @@ import (
"github.com/rafrombrc/gomock/gomock"
gs "github.com/rafrombrc/gospec/src/gospec"
"os"
"time"
)

func DecoderSpec(c gs.Context) {
Expand Down Expand Up @@ -624,9 +626,16 @@ HugePages_Free: 0
_, err = decoder.Decode(pack)
c.Assume(err, gs.IsNil)

c.Expect(pack.Message.GetTimestamp(),
gs.Equals,
int64(1392065938000000000))
// Syslog timestamp doesn't support year, so we have to calculate
// it for the current year or else this test will fail every
// January.
year := time.Now().Year()
tStr := fmt.Sprintf("%d Feb 10 12:58:58 -0800", year)
t, err := time.Parse("2006 Jan 02 15:04:05 -0700", tStr)
c.Assume(err, gs.IsNil)
unixT := t.UnixNano()

c.Expect(pack.Message.GetTimestamp(), gs.Equals, unixT)

c.Expect(pack.Message.GetSeverity(), gs.Equals, int32(4))
c.Expect(pack.Message.GetHostname(), gs.Equals, "testhost")
Expand Down

0 comments on commit 8a4a6ed

Please sign in to comment.