Skip to content

Commit

Permalink
Merge pull request #118 from iotaledger/chore/update-modules
Browse files Browse the repository at this point in the history
Update modules
  • Loading branch information
muXxer authored Dec 19, 2023
2 parents 5349720 + e1c9ff1 commit d01e367
Show file tree
Hide file tree
Showing 9 changed files with 164 additions and 200 deletions.
2 changes: 1 addition & 1 deletion components/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ var (
Name = "inx-faucet"

// Version of the app.
Version = "2.0.0-alpha.16"
Version = "2.0.0-alpha.17"
)

func App() *app.App {
Expand Down
10 changes: 5 additions & 5 deletions components/faucet/component.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func provide(c *dig.Container) error {
// we only allow to receive mana, the rest is blocked.
faucetAddressRestricted, faucetSigner, err := getRestrictedFaucetAddressAndSigner()
if err != nil {
Component.LogErrorAndExit(err)
Component.LogFatal(err.Error())
}

// get the block issuer client
Expand All @@ -87,7 +87,7 @@ func provide(c *dig.Container) error {

return blockissuer, nil
}); err != nil {
Component.LogPanic(err)
Component.LogPanic(err.Error())
}

type faucetDeps struct {
Expand Down Expand Up @@ -268,7 +268,7 @@ func provide(c *dig.Container) error {
deps.NodeBridge.APIProvider(),
faucetAddressRestricted,
faucetSigner,
faucet.WithLogger(Component.Logger()),
faucet.WithLogger(Component.Logger),
faucet.WithTokenName(deps.NodeBridge.NodeConfig().BaseToken.Name),
faucet.WithBaseTokenAmount(iotago.BaseToken(ParamsFaucet.BaseTokenAmount)),
faucet.WithBaseTokenAmountSmall(iotago.BaseToken(ParamsFaucet.BaseTokenAmountSmall)),
Expand All @@ -284,7 +284,7 @@ func provide(c *dig.Container) error {

return faucet, nil
}); err != nil {
Component.LogPanic(err)
Component.LogPanic(err.Error())
}

return nil
Expand Down Expand Up @@ -325,7 +325,7 @@ func run() error {
Component.LogPanicf("failed to start worker: %s", err)
}

e := httpserver.NewEcho(Component.Logger(), nil, ParamsFaucet.DebugRequestLoggerEnabled)
e := httpserver.NewEcho(Component.Logger, nil, ParamsFaucet.DebugRequestLoggerEnabled)
e.Use(middleware.CORSWithConfig(middleware.CORSConfig{
AllowOrigins: []string{"*"},
AllowMethods: []string{http.MethodGet, http.MethodPost},
Expand Down
12 changes: 3 additions & 9 deletions config_defaults.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,12 @@
}
},
"logger": {
"name": "",
"level": "info",
"disableCaller": true,
"disableStacktrace": false,
"stacktraceLevel": "panic",
"encoding": "console",
"encodingConfig": {
"timeEncoder": "rfc3339"
},
"timeFormat": "rfc3339",
"outputPaths": [
"stdout"
],
"disableEvents": true
]
},
"inx": {
"address": "localhost:9029",
Expand Down
34 changes: 9 additions & 25 deletions configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,40 +70,24 @@ Example:

## <a id="logger"></a> 2. Logger

| Name | Description | Type | Default value |
| ---------------------------------------- | --------------------------------------------------------------------------- | ------- | ------------- |
| level | The minimum enabled logging level | string | "info" |
| disableCaller | Stops annotating logs with the calling function's file name and line number | boolean | true |
| disableStacktrace | Disables automatic stacktrace capturing | boolean | false |
| stacktraceLevel | The level stacktraces are captured and above | string | "panic" |
| encoding | The logger's encoding (options: "json", "console") | string | "console" |
| [encodingConfig](#logger_encodingconfig) | Configuration for encodingConfig | object | |
| outputPaths | A list of URLs, file paths or stdout/stderr to write logging output to | array | stdout |
| disableEvents | Prevents log messages from being raced as events | boolean | true |

### <a id="logger_encodingconfig"></a> EncodingConfig

| Name | Description | Type | Default value |
| ----------- | ---------------------------------------------------------------------------------------------------------- | ------ | ------------- |
| timeEncoder | Sets the logger's timestamp encoding. (options: "nanos", "millis", "iso8601", "rfc3339" and "rfc3339nano") | string | "rfc3339" |
| Name | Description | Type | Default value |
| ----------- | -------------------------------------------------------------------------------------------------------------- | ------ | ------------- |
| name | The optional name of the logger instance. All log messages are prefixed with that name. | string | "" |
| level | The minimum enabled logging level | string | "info" |
| timeFormat | Sets the logger's timestamp format. (options: "rfc3339", "rfc3339nano", "datetime", "timeonly", and "iso8601") | string | "rfc3339" |
| outputPaths | A list of file paths or stdout/stderr to write logging output to | array | stdout |

Example:

```json
{
"logger": {
"name": "",
"level": "info",
"disableCaller": true,
"disableStacktrace": false,
"stacktraceLevel": "panic",
"encoding": "console",
"encodingConfig": {
"timeEncoder": "rfc3339"
},
"timeFormat": "rfc3339",
"outputPaths": [
"stdout"
],
"disableEvents": true
]
}
}
```
Expand Down
46 changes: 22 additions & 24 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,49 +3,49 @@ module github.com/iotaledger/inx-faucet
go 1.21

require (
github.com/iotaledger/hive.go/app v0.0.0-20231206114953-6a65a82e30ad
github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231206114953-6a65a82e30ad
github.com/iotaledger/hive.go/crypto v0.0.0-20231206114953-6a65a82e30ad
github.com/iotaledger/hive.go/ds v0.0.0-20231206114953-6a65a82e30ad
github.com/iotaledger/hive.go/ierrors v0.0.0-20231206114953-6a65a82e30ad
github.com/iotaledger/hive.go/lo v0.0.0-20231206114953-6a65a82e30ad
github.com/iotaledger/hive.go/logger v0.0.0-20231206114953-6a65a82e30ad
github.com/iotaledger/hive.go/runtime v0.0.0-20231206114953-6a65a82e30ad
github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231206124511-b78dc962031f
github.com/iotaledger/iota.go/v4 v4.0.0-20231206123921-2af411eef0b5
github.com/iotaledger/hive.go/app v0.0.0-20231219105941-542b1b724494
github.com/iotaledger/hive.go/core v1.0.0-rc.3.0.20231219095137-dd4674b3226e
github.com/iotaledger/hive.go/crypto v0.0.0-20231219105941-542b1b724494
github.com/iotaledger/hive.go/ds v0.0.0-20231219105941-542b1b724494
github.com/iotaledger/hive.go/ierrors v0.0.0-20231219105941-542b1b724494
github.com/iotaledger/hive.go/lo v0.0.0-20231219105941-542b1b724494
github.com/iotaledger/hive.go/log v0.0.0-20231219105941-542b1b724494
github.com/iotaledger/hive.go/runtime v0.0.0-20231219105941-542b1b724494
github.com/iotaledger/inx-app v1.0.0-rc.3.0.20231219130724-cb37c927be6d
github.com/iotaledger/iota.go/v4 v4.0.0-20231219130133-667f32aa821d
github.com/labstack/echo/v4 v4.11.3
go.uber.org/dig v1.17.1
golang.org/x/time v0.5.0
google.golang.org/grpc v1.59.0
google.golang.org/grpc v1.60.1
)

require (
filippo.io/edwards25519 v1.0.0 // indirect
filippo.io/edwards25519 v1.1.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/eclipse/paho.mqtt.golang v1.4.3 // indirect
github.com/ethereum/go-ethereum v1.13.5 // indirect
github.com/ethereum/go-ethereum v1.13.7 // indirect
github.com/fatih/structs v1.1.0 // indirect
github.com/felixge/fgprof v0.9.3 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/go-github v17.0.0+incompatible // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/pprof v0.0.0-20231101202521-4ca4178f5c7a // indirect
github.com/google/pprof v0.0.0-20231212022811-ec68065c825e // indirect
github.com/gorilla/websocket v1.5.1 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
github.com/hashicorp/go-version v1.6.0 // indirect
github.com/holiman/uint256 v1.2.4 // indirect
github.com/iancoleman/orderedmap v0.3.0 // indirect
github.com/iotaledger/hive.go/constraints v0.0.0-20231206114953-6a65a82e30ad // indirect
github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231206114953-6a65a82e30ad // indirect
github.com/iotaledger/hive.go/stringify v0.0.0-20231206114953-6a65a82e30ad // indirect
github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231206124145-f773dfe3927e // indirect
github.com/iotaledger/hive.go/constraints v0.0.0-20231219105941-542b1b724494 // indirect
github.com/iotaledger/hive.go/serializer/v2 v2.0.0-rc.1.0.20231219095137-dd4674b3226e // indirect
github.com/iotaledger/hive.go/stringify v0.0.0-20231219105941-542b1b724494 // indirect
github.com/iotaledger/inx/go v1.0.0-rc.2.0.20231219130433-ad0971fe6306 // indirect
github.com/knadh/koanf v1.5.0 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/labstack/gommon v0.4.1 // indirect
Expand All @@ -57,8 +57,8 @@ require (
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/mr-tron/base58 v1.2.0 // indirect
github.com/pasztorpisti/qs v0.0.0-20171216220353-8d6c33ee906c // indirect
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
github.com/petermattis/goid v0.0.0-20231126143041-f558c26febf5 // indirect
github.com/pelletier/go-toml/v2 v2.1.1 // indirect
github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 // indirect
github.com/prometheus/client_golang v1.17.0 // indirect
github.com/prometheus/client_model v0.5.0 // indirect
github.com/prometheus/common v0.45.0 // indirect
Expand All @@ -69,14 +69,12 @@ require (
github.com/tcnksm/go-latest v0.0.0-20170313132115-e3007ae9052e // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/valyala/fasttemplate v1.2.2 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.26.0 // indirect
golang.org/x/crypto v0.16.0 // indirect
golang.org/x/crypto v0.17.0 // indirect
golang.org/x/net v0.19.0 // indirect
golang.org/x/sync v0.5.0 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/text v0.14.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231127180814-3a041ad873d4 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231212172506-995d672761c0 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
)
Loading

0 comments on commit d01e367

Please sign in to comment.