Refactoring, Bugfix & Updates
+ Refactored all imports + Fixed a bug for the logging regarding removing \n \t \r + Updated to current MGO release + Changed the name of ICCC
This commit is contained in:
1 parent
b50066ef5d
commit
f33f7b5c29
91 files changed
+496
-316
No files matched your search
@@ -1,6 +1,8 @@
|
||||
package DeviceDatabase
|
||||
|
||||
import "github.com/SommerEngineering/Ocean/Log"
|
||||
import (
|
||||
"github.com/SommerEngineering/Ocean/Log"
|
||||
)
|
||||
|
||||
func ActivateLoggingDevice() {
|
||||
Log.AddLoggingDevice(Database{})
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
package DeviceDatabase
|
||||
|
||||
import "strconv"
|
||||
import "fmt"
|
||||
import "github.com/SommerEngineering/Ocean/ConfigurationDB"
|
||||
import "github.com/SommerEngineering/Ocean/Log"
|
||||
import LM "github.com/SommerEngineering/Ocean/Log/Meta"
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/SommerEngineering/Ocean/ConfigurationDB"
|
||||
"github.com/SommerEngineering/Ocean/Log"
|
||||
LM "github.com/SommerEngineering/Ocean/Log/Meta"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
package DeviceDatabase
|
||||
|
||||
import "labix.org/v2/mgo"
|
||||
import "github.com/SommerEngineering/Ocean/ConfigurationDB"
|
||||
import "github.com/SommerEngineering/Ocean/Log"
|
||||
import LM "github.com/SommerEngineering/Ocean/Log/Meta"
|
||||
import (
|
||||
"github.com/SommerEngineering/Ocean/ConfigurationDB"
|
||||
"github.com/SommerEngineering/Ocean/Log"
|
||||
LM "github.com/SommerEngineering/Ocean/Log/Meta"
|
||||
"gopkg.in/mgo.v2"
|
||||
)
|
||||
|
||||
func initDatabase() {
|
||||
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
package DeviceDatabase
|
||||
|
||||
import "time"
|
||||
import "github.com/SommerEngineering/Ocean/Shutdown"
|
||||
import (
|
||||
"github.com/SommerEngineering/Ocean/Shutdown"
|
||||
"time"
|
||||
)
|
||||
|
||||
// Case: The cache is full
|
||||
func cacheFull() {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package DeviceDatabase
|
||||
|
||||
import "github.com/SommerEngineering/Ocean/Log/Meta"
|
||||
import (
|
||||
"github.com/SommerEngineering/Ocean/Log/Meta"
|
||||
)
|
||||
|
||||
type Database struct {
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package DeviceDatabase
|
||||
|
||||
import "time"
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
type LogDBEntry struct {
|
||||
TimeUTC time.Time `bson:"TimeUTC"`
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
package DeviceDatabase
|
||||
|
||||
import "sync"
|
||||
import "labix.org/v2/mgo"
|
||||
import LM "github.com/SommerEngineering/Ocean/Log/Meta"
|
||||
import (
|
||||
LM "github.com/SommerEngineering/Ocean/Log/Meta"
|
||||
"gopkg.in/mgo.v2"
|
||||
"sync"
|
||||
)
|
||||
|
||||
var (
|
||||
senderName LM.Sender = `System::Logger::Database`
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package DeviceDatabase
|
||||
|
||||
import "github.com/SommerEngineering/Ocean/Log/Meta"
|
||||
import (
|
||||
"github.com/SommerEngineering/Ocean/Log/Meta"
|
||||
)
|
||||
|
||||
func write2Cache(entries []Meta.Entry) {
|
||||
for _, entry := range entries {
|
||||
|
||||
Reference in new issue
Block a user