Mapper and Loggable

28 views
Skip to first unread message

Jonathan Ferguson

unread,
Apr 23, 2014, 4:23:26 AM4/23/14
to lif...@googlegroups.com
 I know there is an answer to this, I can't find it and may brain is fried. 


class Example extends LongKeyedMapper[Example ] with IdPK with Loggable {

  def getSingleton = Example 

}

object Example  extends Example  with LongKeyedMetaMapper[Example ] 


 The above will fail to compile with the following error:

Example.scala overriding value logger in trait Loggable of type net.liftweb.common.Logger;  value logger in trait MetaMapper of type net.liftweb.common.Logger has weaker access privileges; it should not be private

Cheers 
Jono

Torsten Uhlmann

unread,
Apr 23, 2014, 4:54:25 AM4/23/14
to lif...@googlegroups.com, Jonathan Ferguson
I found this thread that discusses the problem:
https://groups.google.com/forum/#!topic/liftweb/CRdzGyZa6vs

It has no real solution, just kind of an explanation (which you gave :)
)

Looking at MetaMapper, I found it has a private val logger, I guess
that's the culprit?

Torsten

Am Mi 23 Apr 2014 10:23:26 CEST schrieb Jonathan Ferguson:
> I know there is an answer to this, I can't find it and may brain is
> fried.
>
>
> class Example extends LongKeyedMapper[Example ] with IdPK with Loggable {
>
> def getSingleton = Example
>
> }
>
> objectExampleextendsExamplewithLongKeyedMetaMapper[Example ]
>
>
> The above will fail to compile with the following error:
>
> Example.scalaoverriding value logger in trait Loggable of type
> net.liftweb.common.Logger; value logger in trait MetaMapper of type
> net.liftweb.common.Logger has weaker access privileges; it should not
> be private
>
> Cheers
> Jono
>
> --
> --
> Lift, the simply functional web framework: http://liftweb.net
> Code: http://github.com/lift
> Discussion: http://groups.google.com/group/liftweb
> Stuck? Help us help you:
> https://www.assembla.com/wiki/show/liftweb/Posting_example_code
>
> ---
> You received this message because you are subscribed to the Google
> Groups "Lift" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to liftweb+u...@googlegroups.com
> <mailto:liftweb+u...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.

--
--
AGYNAMIX(R). Passionate Software.
Inh. Torsten Uhlmann | Buchenweg 5 | 09380 Thalheim
Phone: +49 3721 273445
Fax: +49 3721 273446
Mobile: +49 151 12412427
Web: http://www.agynamix.de
Author of "Lift Web Applications How-To"

Torsten Uhlmann

unread,
Apr 23, 2014, 5:07:03 AM4/23/14
to lif...@googlegroups.com, Jonathan Ferguson
Instead of adding Loggable you could add:

private val logger = Logger(classOf[Example])

to your class. That should compile.

Jonathan Ferguson

unread,
Apr 23, 2014, 6:46:52 PM4/23/14
to lif...@googlegroups.com, Jonathan Ferguson
Oh dear :) 

Thank you. 

Jonathan Ferguson

unread,
Apr 23, 2014, 6:47:15 PM4/23/14
to lif...@googlegroups.com, Jonathan Ferguson
I'll give it a go, thank you again.

Jono
Reply all
Reply to author
Forward
0 new messages