Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add custom logger functionality for CacheLevels #27

Closed
vittoriom opened this issue Jul 14, 2015 · 1 comment
Closed

Add custom logger functionality for CacheLevels #27

vittoriom opened this issue Jul 14, 2015 · 1 comment

Comments

@vittoriom
Copy link
Contributor

Basic idea is that every CacheLevel has its own logger reference. Logger is a protocol with a log function.

Breakdown would be:

public enum LogLevel {
    case Debug, Info, Warning, Error, Fatal, None  
}

public protocol Logger {
    func log(message: String, level: LogLevel)
}

and then

public protocol CacheLevel {
   [...]

   func setLogger(logger: Logger)
}

Then one can call setLogger on whatever CacheLevel (for example the top-most, that will set the logger to all its managed cache levels, or whichever you need to).

@vittoriom vittoriom added this to the Second release milestone Jul 14, 2015
@vittoriom vittoriom modified the milestones: 0.3.0, 0.2.0 Aug 6, 2015
@vittoriom vittoriom modified the milestones: 0.4.1, 0.4, Future Sep 18, 2015
@vittoriom
Copy link
Contributor Author

Won't fix because it's IMHO too complex and the reward is not worth the effort

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant