Skip to content

Commit fd97fb1

Browse files
committed
enabling external repo
1 parent 1035b29 commit fd97fb1

File tree

5 files changed

+18
-20
lines changed

5 files changed

+18
-20
lines changed

gorm-formatter/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
### Usage:
55

66

7-
`go get github.com/gtforge/logart/gorm-formatter`
7+
`go get github.com/GettEngineering/logart/gorm-formatter`
88

99

1010
```
@@ -31,7 +31,7 @@ type impl struct {
3131
```
3232
This import:
3333
```
34-
_ "github.com/gtforge/logart/gorm-formatter/automatic-setter"
34+
_ "github.com/GettEngineering/logart/gorm-formatter/automatic-setter"
3535
```
3636
should be done directly in package
3737

@@ -61,11 +61,11 @@ in stage/dev environments.
6161

6262
- Short and humble (as we are) formatted log (made by this formatter)
6363

64-
![alt text](https://github.com/gtforge/logart/blob/master/gorm-formatter/readme_files/logart_gorm_formatter.png "Example")
64+
![alt text](https://github.com/GettEngineering/logart/blob/master/gorm-formatter/readme_files/logart_gorm_formatter.png "Example")
6565

6666
- Default (long and too colored) gorm formatted log:
6767

68-
![alt text](https://github.com/gtforge/logart/blob/master/gorm-formatter/readme_files/default_gorm_formatter.png "Example")
68+
![alt text](https://github.com/GettEngineering/logart/blob/master/gorm-formatter/readme_files/default_gorm_formatter.png "Example")
6969

7070

7171
### Technical details (advanced reading):
Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
package automaticsetter
22

3-
import (
4-
"github.com/gtforge/logart/gorm-formatter"
5-
"github.com/gtforge/services_common_go/gett-storages"
6-
)
7-
83
func init() {
9-
gettStorages.DB.SetLogger(gormlogformatter.DefaultLogger())
4+
// Once DB client reference is cloned, you might use this to
5+
// enable log formatter:
6+
//
7+
// your.db.client.set.logger(gormlogformatter.DefaultLogger())
108
}

gorm-formatter/formatter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ func retrieveData(formatOptions FormatOptions, values ...interface{}) (knownForm
198198
// OR
199199

200200
//[]interface {}{
201-
// "\x1b[35m(/Users/gizatullinartiom/go/src/github.com/gtforge/global_ride_management_service/pkg/partition_manager/partition_manager_dao.go:55)\x1b[0m",
201+
// "\x1b[35m(/Users/user/go/src/github.com/repo_name/lib/partition_manager_dao.go:55)\x1b[0m",
202202
// "\n\x1b[33m[2019-03-25 17:46:16]\x1b[0m",
203203
// "\x1b[31;1m",
204204
// &pq.Error{...},

logrus-human-formatter/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# logrus formatter
22

33

4-
![alt text](https://github.com/gtforge/logart/blob/master/logrus-human-formatter/readme_files/formatted.png "Example")
4+
![alt text](https://github.com/GettEngineering/logart/blob/master/logrus-human-formatter/readme_files/formatted.png "Example")
55

66
### Usage:
77

8-
`go get github.com/gtforge/logart/logrus-human-formatter`
8+
`go get github.com/GettEngineering/logart/logrus-human-formatter`
99

1010
Default setup:
1111
```
@@ -109,18 +109,18 @@ For most of the usages in real life, it can be useful to differentiate between p
109109
and dev/stage environments. Most likely this formatter will be enabled on
110110
dev/stage (output is the terminal window - we want nice formatted log) and
111111
disabled on prod (log management systems). Of course on prod env we'll use
112-
another type of formatter, such as json formatter ([like this one](https://github.com/gtforge/logart/tree/master/logrus-json-formatter))
112+
another type of formatter, such as json formatter ([like this one](https://github.com/GettEngineering/logart/tree/master/logrus-json-formatter))
113113

114114
### Comparison:
115115

116116
Here is couple of possible options to format the log. **Same** log is shown
117117
in three different ways:
118118

119119
Colorized log (made by this formatter):
120-
![alt text](https://github.com/gtforge/logart/blob/master/logrus-human-formatter/readme_files/formatted.png "Example")
120+
![alt text](https://github.com/GettEngineering/logart/blob/master/logrus-human-formatter/readme_files/formatted.png "Example")
121121

122122
Default log (logrus default):
123-
![alt text](https://github.com/gtforge/logart/blob/master/logrus-human-formatter/readme_files/default-formatter.png "Example")
123+
![alt text](https://github.com/GettEngineering/logart/blob/master/logrus-human-formatter/readme_files/default-formatter.png "Example")
124124

125125
JSON formatted log (log is printed as JSON):
126-
![alt text](https://github.com/gtforge/logart/blob/master/logrus-human-formatter/readme_files/json-formatter.png "Example")
126+
![alt text](https://github.com/GettEngineering/logart/blob/master/logrus-human-formatter/readme_files/json-formatter.png "Example")

logrus-json-formatter/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33

44
JSON formatted log (log is printed as JSON):
5-
![alt text](https://github.com/gtforge/logart/blob/master/logrus-json-formatter/readme_files/json-formatter.png "Example")
5+
![alt text](https://github.com/GettEngineering/logart/blob/master/logrus-json-formatter/readme_files/json-formatter.png "Example")
66

77
### Usage:
88

9-
`go get github.com/gtforge/logart/logrus-json-formatter`
9+
`go get github.com/GettEngineering/logart/logrus-json-formatter`
1010

1111
Default setup:
1212
```
@@ -37,5 +37,5 @@ current "RequestID" or "SessionID" - depends infra code is running in.
3737
JSON formatter is good for log managements systems.
3838

3939
To make the log more "human readable" (for example in dev/stage environments)
40-
another formatter should be used, see [human readable formatter](https://github.com/gtforge/logart/tree/master/logrus-human-formatter)
40+
another formatter should be used, see [human readable formatter](https://github.com/GettEngineering/logart/tree/master/logrus-human-formatter)
4141
for more info.

0 commit comments

Comments
 (0)