fslog

package
v0.13.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 11, 2023 License: MIT Imports: 4 Imported by: 1

Documentation

Overview

Package fslog provides an afero FS logging package

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadFS

func LoadFS(src afero.Fs, logger log.Logger) (afero.Fs, error)

LoadFS creates an instance with logging

Types

type File

type File struct {
	// contains filtered or unexported fields
}

File is a wrapper to log interactions around file accesses

func (*File) Close

func (f *File) Close() error

Close calls will be logged

func (*File) Name

func (f *File) Name() string

Name won't be logged

func (*File) Read

func (f *File) Read(p []byte) (int, error)

Read won't be logged

func (*File) ReadAt

func (f *File) ReadAt(p []byte, off int64) (int, error)

ReadAt won't be logged

func (*File) Readdir

func (f *File) Readdir(count int) ([]os.FileInfo, error)

Readdir won't be logged

func (*File) Readdirnames

func (f *File) Readdirnames(n int) ([]string, error)

Readdirnames won't be logged

func (*File) Seek

func (f *File) Seek(offset int64, whence int) (int64, error)

Seek won't be logged

func (*File) Stat

func (f *File) Stat() (os.FileInfo, error)

Stat won't be logged

func (*File) Sync

func (f *File) Sync() error

Sync won't be logged

func (*File) Truncate

func (f *File) Truncate(size int64) error

Truncate won't be logged

func (*File) Write

func (f *File) Write(p []byte) (int, error)

Write won't be logged

func (*File) WriteAt

func (f *File) WriteAt(p []byte, off int64) (int, error)

WriteAt won't be logged

func (*File) WriteString

func (f *File) WriteString(str string) (int, error)

WriteString won't be logged

type Fs

type Fs struct {
	// contains filtered or unexported fields
}

Fs is a wrapper to log interactions around file system accesses

func (*Fs) Chmod

func (f *Fs) Chmod(name string, mode os.FileMode) error

Chmod calls will not be logged

func (*Fs) Chown added in v0.9.0

func (f *Fs) Chown(name string, uid int, gid int) error

Chown calls will not be logged

func (*Fs) Chtimes

func (f *Fs) Chtimes(name string, atime time.Time, mtime time.Time) error

Chtimes calls will not be logged

func (*Fs) Create

func (f *Fs) Create(name string) (afero.File, error)

Create calls will logged

func (*Fs) Mkdir

func (f *Fs) Mkdir(name string, perm os.FileMode) error

Mkdir calls will not be logged

func (*Fs) MkdirAll

func (f *Fs) MkdirAll(path string, perm os.FileMode) error

MkdirAll calls will not be logged

func (*Fs) Name

func (f *Fs) Name() string

Name calls will not be logged

func (*Fs) Open

func (f *Fs) Open(name string) (afero.File, error)

Open calls will be logged

func (*Fs) OpenFile

func (f *Fs) OpenFile(name string, flag int, perm os.FileMode) (afero.File, error)

OpenFile calls will be logged

func (*Fs) Remove

func (f *Fs) Remove(name string) error

Remove calls will be logged

func (*Fs) RemoveAll

func (f *Fs) RemoveAll(path string) error

RemoveAll calls will not be logged

func (*Fs) Rename

func (f *Fs) Rename(oldname, newname string) error

Rename calls will not be logged

func (*Fs) Stat

func (f *Fs) Stat(name string) (os.FileInfo, error)

Stat calls will not be logged

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL