diff --git a/cmd/ipfs/daemon.go b/cmd/ipfs/daemon.go index a9beefdc580..d4647d2f54e 100644 --- a/cmd/ipfs/daemon.go +++ b/cmd/ipfs/daemon.go @@ -227,7 +227,7 @@ func daemonFunc(req *cmds.Request, re cmds.ResponseEmitter, env cmds.Environment // check transport encryption flag. unencrypted, _ := req.Options[unencryptTransportKwd].(bool) if unencrypted { - log.Warningf(`Running with --%s: All connections are UNENCRYPTED. + log.Warnf(`Running with --%s: All connections are UNENCRYPTED. You will not be able to connect to regular encrypted networks.`, unencryptTransportKwd) } diff --git a/core/bootstrap/bootstrap.go b/core/bootstrap/bootstrap.go index 02669036633..e6ec29eea75 100644 --- a/core/bootstrap/bootstrap.go +++ b/core/bootstrap/bootstrap.go @@ -80,7 +80,7 @@ func Bootstrap(id peer.ID, host host.Host, rt routing.Routing, cfg BootstrapConf if len(cfg.BootstrapPeers()) == 0 { // We *need* to bootstrap but we have no bootstrap peers // configured *at all*, inform the user. - log.Warning("no bootstrap nodes configured: go-ipfs may have difficulty connecting to the network") + log.Warn("no bootstrap nodes configured: go-ipfs may have difficulty connecting to the network") } // the periodic bootstrap function -- the connection supervisor diff --git a/core/commands/add.go b/core/commands/add.go index c517487005c..a259c760563 100644 --- a/core/commands/add.go +++ b/core/commands/add.go @@ -286,7 +286,7 @@ You can now check what blocks have been created by: go func() { size, err := req.Files.Size() if err != nil { - log.Warningf("error getting files size: %s", err) + log.Warnf("error getting files size: %s", err) // see comment above return } diff --git a/core/commands/cat.go b/core/commands/cat.go index 0fab3c577da..8aff890284a 100644 --- a/core/commands/cat.go +++ b/core/commands/cat.go @@ -104,7 +104,7 @@ var CatCmd = &cmds.Command{ return err } default: - log.Warningf("cat postrun: received unexpected type %T", val) + log.Warnf("cat postrun: received unexpected type %T", val) } } }, diff --git a/core/core.go b/core/core.go index 702b42b3a08..f7465108f97 100644 --- a/core/core.go +++ b/core/core.go @@ -143,7 +143,7 @@ func (n *IpfsNode) Bootstrap(cfg bootstrap.BootstrapConfig) error { cfg.BootstrapPeers = func() []peer.AddrInfo { ps, err := n.loadBootstrapPeers() if err != nil { - log.Warning("failed to parse bootstrap peers from config") + log.Warn("failed to parse bootstrap peers from config") return nil } return ps diff --git a/core/corehttp/commands.go b/core/corehttp/commands.go index 867805ce2da..d63099bfbfc 100644 --- a/core/corehttp/commands.go +++ b/core/corehttp/commands.go @@ -47,7 +47,7 @@ var defaultLocalhostOrigins = []string{ func addCORSFromEnv(c *cmdsHttp.ServerConfig) { origin := os.Getenv(originEnvKey) if origin != "" { - log.Warning(originEnvKeyDeprecate) + log.Warn(originEnvKeyDeprecate) c.AppendAllowedOrigins(origin) } } diff --git a/core/corehttp/gateway_handler.go b/core/corehttp/gateway_handler.go index 62d151ee4c6..de8038f5306 100644 --- a/core/corehttp/gateway_handler.go +++ b/core/corehttp/gateway_handler.go @@ -610,7 +610,7 @@ func webError(w http.ResponseWriter, message string, err error, defaultCode int) func webErrorWithCode(w http.ResponseWriter, message string, err error, code int) { http.Error(w, fmt.Sprintf("%s: %s", message, err), code) if code >= 500 { - log.Warningf("server error: %s: %s", err) + log.Warnf("server error: %s: %s", err) } } diff --git a/core/corerepo/gc.go b/core/corerepo/gc.go index e62d490c4b1..c05b9f56151 100644 --- a/core/corerepo/gc.go +++ b/core/corerepo/gc.go @@ -212,7 +212,7 @@ func (gc *GC) maybeGC(ctx context.Context, offset uint64) error { if storage+offset > gc.StorageGC { if storage+offset > gc.StorageMax { - log.Warningf("pre-GC: %s", ErrMaxStorageExceeded) + log.Warnf("pre-GC: %s", ErrMaxStorageExceeded) } // Do GC here diff --git a/core/node/libp2p/discovery.go b/core/node/libp2p/discovery.go index 007cd02bf13..9ffe46180ec 100644 --- a/core/node/libp2p/discovery.go +++ b/core/node/libp2p/discovery.go @@ -24,7 +24,7 @@ func (dh *discoveryHandler) HandlePeerFound(p peer.AddrInfo) { ctx, cancel := context.WithTimeout(dh.ctx, discoveryConnTimeout) defer cancel() if err := dh.host.Connect(ctx, p); err != nil { - log.Warningf("failed to connect to peer %s found by discovery: %s", p.ID, err) + log.Warnf("failed to connect to peer %s found by discovery: %s", p.ID, err) } } diff --git a/core/node/libp2p/pnet.go b/core/node/libp2p/pnet.go index bf4cc556e42..11bede0546c 100644 --- a/core/node/libp2p/pnet.go +++ b/core/node/libp2p/pnet.go @@ -51,8 +51,8 @@ func PNetChecker(repo repo.Repo, ph host.Host, lc fx.Lifecycle) error { select { case <-t.C: if len(ph.Network().Peers()) == 0 { - log.Warning("We are in private network and have no peers.") - log.Warning("This might be configuration mistake.") + log.Warn("We are in private network and have no peers.") + log.Warn("This might be configuration mistake.") } case <-done: return diff --git a/core/node/libp2p/smux.go b/core/node/libp2p/smux.go index 95e599ec200..e89e0095652 100644 --- a/core/node/libp2p/smux.go +++ b/core/node/libp2p/smux.go @@ -36,7 +36,7 @@ func makeSmuxTransportOption(mplexExp bool) libp2p.Option { for _, id := range order { tpt, ok := muxers[id] if !ok { - log.Warning("unknown or duplicate muxer in LIBP2P_MUX_PREFS: %s", id) + log.Warn("unknown or duplicate muxer in LIBP2P_MUX_PREFS: %s", id) continue } delete(muxers, id) diff --git a/core/node/libp2p/transport.go b/core/node/libp2p/transport.go index a08ec86c15a..33465a18381 100644 --- a/core/node/libp2p/transport.go +++ b/core/node/libp2p/transport.go @@ -15,7 +15,7 @@ func Security(enabled, preferTLS bool) interface{} { if !enabled { return func() (opts Libp2pOpts) { // TODO: shouldn't this be Errorf to guarantee visibility? - log.Warningf(`Your IPFS node has been configured to run WITHOUT ENCRYPTED CONNECTIONS. + log.Warnf(`Your IPFS node has been configured to run WITHOUT ENCRYPTED CONNECTIONS. You will not be able to connect to any nodes configured to use encrypted connections`) opts.Opts = append(opts.Opts, libp2p.NoSecurity) return opts diff --git a/fuse/ipns/ipns_unix.go b/fuse/ipns/ipns_unix.go index 0e3e0b73611..6b18b716d5f 100644 --- a/fuse/ipns/ipns_unix.go +++ b/fuse/ipns/ipns_unix.go @@ -201,7 +201,7 @@ func (s *Root) Lookup(ctx context.Context, name string) (fs.Node, error) { ipnsName := "/ipns/" + name resolved, err := s.Ipfs.Namesys.Resolve(s.Ipfs.Context(), ipnsName) if err != nil { - log.Warningf("ipns: namesys resolve error: %s", err) + log.Warnf("ipns: namesys resolve error: %s", err) return nil, fuse.ENOENT } diff --git a/fuse/mount/fuse.go b/fuse/mount/fuse.go index da7efb02583..1c5f0d2ce8d 100644 --- a/fuse/mount/fuse.go +++ b/fuse/mount/fuse.go @@ -110,7 +110,7 @@ func (m *mount) unmount() error { m.setActive(false) return nil } - log.Warningf("fuse unmount err: %s", err) + log.Warnf("fuse unmount err: %s", err) // try closing the fuseConn err = m.fuseConn.Close() @@ -118,7 +118,7 @@ func (m *mount) unmount() error { m.setActive(false) return nil } - log.Warningf("fuse conn error: %s", err) + log.Warnf("fuse conn error: %s", err) // try mount.ForceUnmountManyTimes if err := ForceUnmountManyTimes(m, 10); err != nil { diff --git a/fuse/mount/mount.go b/fuse/mount/mount.go index 84df699e8af..52784a16d27 100644 --- a/fuse/mount/mount.go +++ b/fuse/mount/mount.go @@ -36,7 +36,7 @@ type Mount interface { // It does so by calling diskutil or fusermount directly. func ForceUnmount(m Mount) error { point := m.MountPoint() - log.Warningf("Force-Unmounting %s...", point) + log.Warnf("Force-Unmounting %s...", point) cmd, err := UnmountCmd(point) if err != nil { @@ -98,7 +98,7 @@ type closer struct { } func (c *closer) Close() error { - log.Warning(" (c *closer) Close(),", c.M.MountPoint()) + log.Warn(" (c *closer) Close(),", c.M.MountPoint()) return c.M.Unmount() } diff --git a/fuse/readonly/readonly_unix.go b/fuse/readonly/readonly_unix.go index 9ac6a2018d3..47fdbc42a64 100644 --- a/fuse/readonly/readonly_unix.go +++ b/fuse/readonly/readonly_unix.go @@ -186,7 +186,7 @@ func (s *Node) ReadDirAll(ctx context.Context) ([]fuse.Dirent, error) { } nd, err := s.Ipfs.DAG.Get(ctx, lnk.Cid) if err != nil { - log.Warning("error fetching directory child node: ", err) + log.Warn("error fetching directory child node: ", err) } t := fuse.DT_Unknown @@ -195,7 +195,7 @@ func (s *Node) ReadDirAll(ctx context.Context) ([]fuse.Dirent, error) { t = fuse.DT_File case *mdag.ProtoNode: if fsn, err := ft.FSNodeFromBytes(nd.Data()); err != nil { - log.Warning("failed to unmarshal protonode data field:", err) + log.Warn("failed to unmarshal protonode data field:", err) } else { switch fsn.Type() { case ft.TDirectory, ft.THAMTShard: diff --git a/keystore/keystore.go b/keystore/keystore.go index 237d4b05c3a..991de5dd1d2 100644 --- a/keystore/keystore.go +++ b/keystore/keystore.go @@ -168,7 +168,7 @@ func (ks *FSKeystore) List() ([]string, error) { if err == nil { list = append(list, name) } else { - log.Warningf("Ignoring the invalid keyfile: %s", name) + log.Warnf("Ignoring the invalid keyfile: %s", name) } } diff --git a/p2p/local.go b/p2p/local.go index bff25e20014..836e80f33e9 100644 --- a/p2p/local.go +++ b/p2p/local.go @@ -76,7 +76,7 @@ func (l *localListener) setupStream(local manet.Conn) { remote, err := l.dial(l.ctx) if err != nil { local.Close() - log.Warningf("failed to dial to remote %s/%s", l.peer.Pretty(), l.proto) + log.Warnf("failed to dial to remote %s/%s", l.peer.Pretty(), l.proto) return } diff --git a/plugin/loader/load_unix.go b/plugin/loader/load_unix.go index 182b8174609..db1eb5d970f 100644 --- a/plugin/loader/load_unix.go +++ b/plugin/loader/load_unix.go @@ -26,7 +26,7 @@ func linuxLoadFunc(pluginDir string) ([]iplugin.Plugin, error) { } if info.IsDir() { if fi != pluginDir { - log.Warningf("found directory inside plugins directory: %s", fi) + log.Warnf("found directory inside plugins directory: %s", fi) } return nil } diff --git a/repo/fsrepo/fsrepo.go b/repo/fsrepo/fsrepo.go index b28aed8ada2..6ee436605cc 100644 --- a/repo/fsrepo/fsrepo.go +++ b/repo/fsrepo/fsrepo.go @@ -403,7 +403,7 @@ func (r *FSRepo) openDatastore() error { return fmt.Errorf("required Datastore.Spec entry missing from config file") } if r.config.Datastore.NoSync { - log.Warning("NoSync is now deprecated in favor of datastore specific settings. If you want to disable fsync on flatfs set 'sync' to false. See https://github.com/ipfs/go-ipfs/blob/master/docs/datastores.md#flatfs.") + log.Warn("NoSync is now deprecated in favor of datastore specific settings. If you want to disable fsync on flatfs set 'sync' to false. See https://github.com/ipfs/go-ipfs/blob/master/docs/datastores.md#flatfs.") } dsc, err := AnyDatastoreConfig(r.config.Datastore.Spec) @@ -457,7 +457,7 @@ func (r *FSRepo) Close() error { err := os.Remove(filepath.Join(r.path, apiFile)) if err != nil && !os.IsNotExist(err) { - log.Warning("error removing api file: ", err) + log.Warn("error removing api file: ", err) } if err := r.ds.Close(); err != nil {