cppcms-users Mailing List for CppCMS C++ Web Framework (Page 104)
Brought to you by:
artyom-beilis
You can subscribe to this list here.
2009 |
Jan
|
Feb
(22) |
Mar
|
Apr
(3) |
May
|
Jun
(4) |
Jul
|
Aug
|
Sep
|
Oct
(15) |
Nov
(16) |
Dec
(13) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2010 |
Jan
(4) |
Feb
|
Mar
(8) |
Apr
(8) |
May
(8) |
Jun
(36) |
Jul
(63) |
Aug
(126) |
Sep
(47) |
Oct
(66) |
Nov
(46) |
Dec
(42) |
2011 |
Jan
(87) |
Feb
(24) |
Mar
(54) |
Apr
(21) |
May
(22) |
Jun
(18) |
Jul
(22) |
Aug
(101) |
Sep
(57) |
Oct
(33) |
Nov
(34) |
Dec
(66) |
2012 |
Jan
(64) |
Feb
(76) |
Mar
(73) |
Apr
(105) |
May
(93) |
Jun
(83) |
Jul
(84) |
Aug
(88) |
Sep
(57) |
Oct
(59) |
Nov
(35) |
Dec
(49) |
2013 |
Jan
(67) |
Feb
(17) |
Mar
(49) |
Apr
(64) |
May
(87) |
Jun
(64) |
Jul
(93) |
Aug
(23) |
Sep
(15) |
Oct
(16) |
Nov
(62) |
Dec
(73) |
2014 |
Jan
(5) |
Feb
(23) |
Mar
(21) |
Apr
(11) |
May
(1) |
Jun
(19) |
Jul
(27) |
Aug
(16) |
Sep
(5) |
Oct
(37) |
Nov
(12) |
Dec
(9) |
2015 |
Jan
(7) |
Feb
(7) |
Mar
(44) |
Apr
(28) |
May
(5) |
Jun
(12) |
Jul
(8) |
Aug
|
Sep
(39) |
Oct
(34) |
Nov
(30) |
Dec
(34) |
2016 |
Jan
(66) |
Feb
(23) |
Mar
(33) |
Apr
(15) |
May
(11) |
Jun
(15) |
Jul
(26) |
Aug
(4) |
Sep
(1) |
Oct
(30) |
Nov
(10) |
Dec
|
2017 |
Jan
(52) |
Feb
(9) |
Mar
(24) |
Apr
(16) |
May
(9) |
Jun
(12) |
Jul
(33) |
Aug
(8) |
Sep
|
Oct
(1) |
Nov
(2) |
Dec
(6) |
2018 |
Jan
(5) |
Feb
|
Mar
|
Apr
|
May
(14) |
Jun
(1) |
Jul
(9) |
Aug
(1) |
Sep
(13) |
Oct
(8) |
Nov
(2) |
Dec
(2) |
2019 |
Jan
(1) |
Feb
(1) |
Mar
(3) |
Apr
(3) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
2020 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
(9) |
Jul
(6) |
Aug
(25) |
Sep
(10) |
Oct
(10) |
Nov
(6) |
Dec
|
2021 |
Jan
|
Feb
|
Mar
(7) |
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
(9) |
Oct
(1) |
Nov
|
Dec
|
2022 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Artyom B. <art...@ya...> - 2011-11-02 09:29:03
|
> Another question, we are in GMT+8(Beijing),but the time zone in log file is GMT 0 , > so how can I config it to another time zone? Currently GMT is hard coded. Actually it should be not hard to make it configurable. and it would be very good to add this to logging system. Open a feature request in bug tracking system so I will not forget. Meanwhile you can only implement your own sink... Artyom |
From: 陈抒 <csf...@gm...> - 2011-11-02 03:11:30
|
I figured out the real reason.There is no log info because my code try to produce the log info before running cppcms::service object. My configuration is correct. After calling cppcms::service.run method,I can see my log now. Another question, we are in GMT+8(Beijing),but the time zone in log file is GMT 0 , so how can I config it to another time zone? 陈抒 Best regards http://blog.csdn.net/sheismylife On Mon, Oct 17, 2011 at 2:32 AM, Artyom Beilis <art...@ya...> wrote: > > > I tried booster::log today.If I added > > sink explicitly below,it worked > > fine,and I could see the log info in log file. > > > > void init_log(){ > > booster::shared_ptr<booster::log::sinks::file> > > f(new > > booster::log::sinks::file()); > > f->open("my_log"); > > booster::log::logger::instance().add_sink(f); > > } > > > > int main(int argc,char ** argv){ > > > > try { > > init_log(); > > BOOSTER_ERROR("module") << > > "Message " << 3.14159; > > .... > > } > > > > 2011-10-13 06:18:44 GMT; module, error: Message 3.14159 > > (main.cpp:72) > > > > > > But if I configured it in config.js like > > so,I couldn't see any log > > info,only log file was created. > > > > "logging":{ > > "level":"debug", > > "file":{ > > "name":"km_log", > > "append":false, > > "max_files":100 > > } > > } > > > > I looked into your codes and found some code here: > > std::string log_file; > > > > if(!(log_file=settings().get("logging.file.name","")).empty()) > > { > > > > booster::shared_ptr<sinks::file> > > file(new sinks::file()); > > int max_files=0; > > if((max_files = > > settings().get("logging.file.max_files",0)) > 0) > > > > file->max_files(max_files); > > bool append = > > false; > > if((append = > > settings().get("logging.file.append",false))==true) > > > > file->append(); > > > > file->open(log_file); > > > > logger::instance().add_sink(file); > > } > > > > It looked the same as mine code.So no idea now. > > > > Where do you log the data? > Can you be more specific? Are you sure you get > to the log part? Do you see log file created? > files rotated? > > Small (full) sample would help me to figure out > what is the problem. > > Artyom > > > > ------------------------------------------------------------------------------ > All the data continuously generated in your IT infrastructure contains a > definitive record of customers, application performance, security > threats, fraudulent activity and more. Splunk takes this data and makes > sense of it. Business sense. IT sense. Common sense. > http://p.sf.net/sfu/splunk-d2d-oct > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
From: Richard C. <ric...@gm...> - 2011-10-31 16:28:33
|
I am not using the cppcms template system, and simply want to use cppcms to pass json from jQuery to MongoDB. When I use GDB to set a breakpoint and view the request(), I get the error below. I have been developing in Java for 15 years and am just getting acquainted again with C++. What do I need to do to see the request? Richard Catlin Breakpoint 1, chat::log (this=0x1018024a0) at chat.cpp:59 59 } (gdb) p request().post().find("msg") Couldn't find method post (gdb) p request() $1 = (struct cppcms::http::request &) @0x101803f10: <incomplete type> (gdb) p request().post() Couldn't find method post (gdb) p request().request_method() Couldn't find method request_method |
From: 陈抒 <csf...@gm...> - 2011-10-31 06:22:09
|
It works after using the single update statement. thanks! 陈抒 Best regards http://blog.csdn.net/sheismylife On Mon, Oct 31, 2011 at 9:20 AM, 陈抒 <csf...@gm...> wrote: > Thank you very much. > Your two solutions are same as what I figure out last night? I read the > document of MySQL and find the default isolation level is > repeatable-read.Improve this level or use a single update statement maybe > solve my problem. > > :) > > I am trying now. > > This is not a bug,Sorry for that. > > 陈抒 > Best regards > http://blog.csdn.net/sheismylife > > > On Sun, Oct 30, 2011 at 10:00 PM, Artyom Beilis <art...@ya...>wrote: > >> To be honest I don't know I don't think it is problem with cppdb unless >> you show some specific case that I can reproduce. >> >> I can see >> >> 20071:2011-10-30 11:48:37 GMT; award, notice: obtain a real prize, the >> account_id is:2011.the prize_id is:906326 (default_prize_policy.h:196) >> 20121:2011-10-30 11:48:37 GMT; award, notice: obtain a real prize, the >> account_id is:2011.the prize_id is:906326 (default_prize_policy.h:196) >> >> Which looks exactly the same so it is not inconsistent. >> Maybe innodb allows to do updates if they do not conflict? >> >> I'd suggest to recheck carefully the SQL and other assumptions that >> transaction >> isolation provides (especially in MySQL). >> >> I'd also suggest to do this in one operation like this >> >> stmt = sql << "update event_prize set account_id=? ,award_time=now() >> where prizeId=? and account_id is NULL" << .... >> stmt.exec() >> if(stmt.affected() > 0) >> // awarded >> else >> // not awarder >> >> >> ------------------ >> >> About the isolation level. >> >> Shouldn't >> >> sql << "SET SESSION TRANSACTION ISOLATION Level" << cppdb::exec; >> >> work? >> >> Artyom Beilis >> -------------- >> CppCMS - C++ Web Framework: http://cppcms.sf.net/ >> CppDB - C++ SQL Connectivity: http://cppcms.sf.net/sql/cppdb/ >> >> ------------------------------ >> *From:* 陈抒 <csf...@gm...> >> *To:* cpp...@li... >> *Sent:* Sunday, October 30, 2011 2:05 PM >> *Subject:* Re: [Cppcms-users] Bug about transaction in cppdb >> >> My table is using InnoDB engin. >> >> | event_prize | CREATE TABLE `event_prize` ( >> `prizeId` int(10) unsigned NOT NULL AUTO_INCREMENT, >> `type_id` int(10) unsigned NOT NULL COMMENT '奖品类别Id', >> `promo_id` int(10) unsigned NOT NULL COMMENT '活动Id', >> `account_id` int(10) unsigned DEFAULT NULL COMMENT '获奖人', >> `probility` int(10) unsigned DEFAULT NULL COMMENT >> '1-100之间,进入计算时会除以5000', >> `flag` smallint(5) unsigned DEFAULT '0' COMMENT >> '0:用户可以在任何活动中反复获得;1:只能在一个活动中反复获得;2:每个活动中最多获得一个;3:只能在一个活动中获得一个;4:每个时间段内都确保发出;', >> `status` smallint(5) unsigned DEFAULT '1' COMMENT '1激活 0 冻结', >> `info` varchar(256) DEFAULT NULL COMMENT '保存奖品独特的特征信息', >> `quantity` smallint(5) unsigned DEFAULT '0' COMMENT '一个奖品中标明的数量,比如金额', >> `award_time` datetime DEFAULT NULL, >> PRIMARY KEY (`prizeId`), >> KEY `index_prize_event_promo` (`promo_id`), >> KEY `index_prize_event_type` (`type_id`) >> ) ENGINE=InnoDB AUTO_INCREMENT=1174582 DEFAULT CHARSET=utf8 >> >> 陈抒 >> Best regards >> http://blog.csdn.net/sheismylife >> >> >> On Sun, Oct 30, 2011 at 8:04 PM, 陈抒 <csf...@gm...> wrote: >> >> Hello,Artyom: >> >> I run into one problem,I try to update one record in one MySQL table >> using transaction like so: >> >> static shared_ptr<prize> award(shared_ptr<prize> p,shared_ptr<user> >> user, int promo_id){ >> my_application & app = app_singleton_holder::Instance(); >> cppdb::session session(app.config().master_mysql_uri); >> cppdb::statement stat; >> >> cppdb::transaction guard(session); >> cppdb::result res = session <<"select account_id from event_prize >> where prizeId = ? and account_id is NULL"<< p->id(); >> unsigned int account_id; >> if(res.next() ){ >> stat = session << "update event_prize set account_id=? >> ,award_time=now() where prizeId=?" >> << user->account_id() << p->id(); >> stat.exec(); >> guard.commit(); >> //发送站内短信 >> send_message(p , user , promo_id); >> BOOSTER_NOTICE("award") << "obtain a real prize, the account_id is:" << >> user->account_id() << ".the prize_id is:" << p->id(); >> return p; >> }else{ >> guard.rollback(); >> BOOSTER_NOTICE("award") << "already have got a prize, the account_id >> is:"<< user->account_id() << ".the prize_id is:" << p->id(); >> return create_default_prize(user,promo_id); >> } >> } >> >> Then I write a Java test application using TestNG to test my service >> with 50 threads.But the service updates one record twice.Here is my log: >> >> 20071:2011-10-30 11:48:37 GMT; award, notice: obtain a real prize, the >> account_id is:2011.the prize_id is:906326 (default_prize_policy.h:196) >> 20074:2011-10-30 11:48:37 GMT; award, notice: already have got a prize, >> the account_id is:2011.the prize_id is:906326 (default_prize_policy.h:200) >> 20121:2011-10-30 11:48:37 GMT; award, notice: obtain a real prize, the >> account_id is:2011.the prize_id is:906326 (default_prize_policy.h:196) >> >> Maybe it's a bug.Another question,How to change the transaction >> isolation level for MySQL? >> >> >> 陈抒 >> Best regards >> http://blog.csdn.net/sheismylife >> >> >> >> >> ------------------------------------------------------------------------------ >> Get your Android app more play: Bring it to the BlackBerry PlayBook >> in minutes. BlackBerry App World™ now supports Android™ Apps >> for the BlackBerry® PlayBook™. Discover just how easy and simple >> it is! http://p.sf.net/sfu/android-dev2dev >> >> _______________________________________________ >> Cppcms-users mailing list >> Cpp...@li... >> https://lists.sourceforge.net/lists/listinfo/cppcms-users >> >> >> >> >> ------------------------------------------------------------------------------ >> Get your Android app more play: Bring it to the BlackBerry PlayBook >> in minutes. BlackBerry App World™ now supports Android™ Apps >> for the BlackBerry® PlayBook™. Discover just how easy and simple >> >> it is! http://p.sf.net/sfu/android-dev2dev >> >> _______________________________________________ >> Cppcms-users mailing list >> Cpp...@li... >> https://lists.sourceforge.net/lists/listinfo/cppcms-users >> >> > |
From: 陈抒 <csf...@gm...> - 2011-10-31 01:20:48
|
Thank you very much. Your two solutions are same as what I figure out last night? I read the document of MySQL and find the default isolation level is repeatable-read.Improve this level or use a single update statement maybe solve my problem. :) I am trying now. This is not a bug,Sorry for that. 陈抒 Best regards http://blog.csdn.net/sheismylife On Sun, Oct 30, 2011 at 10:00 PM, Artyom Beilis <art...@ya...> wrote: > To be honest I don't know I don't think it is problem with cppdb unless > you show some specific case that I can reproduce. > > I can see > > 20071:2011-10-30 11:48:37 GMT; award, notice: obtain a real prize, the > account_id is:2011.the prize_id is:906326 (default_prize_policy.h:196) > 20121:2011-10-30 11:48:37 GMT; award, notice: obtain a real prize, the > account_id is:2011.the prize_id is:906326 (default_prize_policy.h:196) > > Which looks exactly the same so it is not inconsistent. > Maybe innodb allows to do updates if they do not conflict? > > I'd suggest to recheck carefully the SQL and other assumptions that > transaction > isolation provides (especially in MySQL). > > I'd also suggest to do this in one operation like this > > stmt = sql << "update event_prize set account_id=? ,award_time=now() where > prizeId=? and account_id is NULL" << .... > stmt.exec() > if(stmt.affected() > 0) > // awarded > else > // not awarder > > > ------------------ > > About the isolation level. > > Shouldn't > > sql << "SET SESSION TRANSACTION ISOLATION Level" << cppdb::exec; > > work? > > Artyom Beilis > -------------- > CppCMS - C++ Web Framework: http://cppcms.sf.net/ > CppDB - C++ SQL Connectivity: http://cppcms.sf.net/sql/cppdb/ > > ------------------------------ > *From:* 陈抒 <csf...@gm...> > *To:* cpp...@li... > *Sent:* Sunday, October 30, 2011 2:05 PM > *Subject:* Re: [Cppcms-users] Bug about transaction in cppdb > > My table is using InnoDB engin. > > | event_prize | CREATE TABLE `event_prize` ( > `prizeId` int(10) unsigned NOT NULL AUTO_INCREMENT, > `type_id` int(10) unsigned NOT NULL COMMENT '奖品类别Id', > `promo_id` int(10) unsigned NOT NULL COMMENT '活动Id', > `account_id` int(10) unsigned DEFAULT NULL COMMENT '获奖人', > `probility` int(10) unsigned DEFAULT NULL COMMENT '1-100之间,进入计算时会除以5000', > `flag` smallint(5) unsigned DEFAULT '0' COMMENT > '0:用户可以在任何活动中反复获得;1:只能在一个活动中反复获得;2:每个活动中最多获得一个;3:只能在一个活动中获得一个;4:每个时间段内都确保发出;', > `status` smallint(5) unsigned DEFAULT '1' COMMENT '1激活 0 冻结', > `info` varchar(256) DEFAULT NULL COMMENT '保存奖品独特的特征信息', > `quantity` smallint(5) unsigned DEFAULT '0' COMMENT '一个奖品中标明的数量,比如金额', > `award_time` datetime DEFAULT NULL, > PRIMARY KEY (`prizeId`), > KEY `index_prize_event_promo` (`promo_id`), > KEY `index_prize_event_type` (`type_id`) > ) ENGINE=InnoDB AUTO_INCREMENT=1174582 DEFAULT CHARSET=utf8 > > 陈抒 > Best regards > http://blog.csdn.net/sheismylife > > > On Sun, Oct 30, 2011 at 8:04 PM, 陈抒 <csf...@gm...> wrote: > > Hello,Artyom: > > I run into one problem,I try to update one record in one MySQL table > using transaction like so: > > static shared_ptr<prize> award(shared_ptr<prize> p,shared_ptr<user> > user, int promo_id){ > my_application & app = app_singleton_holder::Instance(); > cppdb::session session(app.config().master_mysql_uri); > cppdb::statement stat; > > cppdb::transaction guard(session); > cppdb::result res = session <<"select account_id from event_prize > where prizeId = ? and account_id is NULL"<< p->id(); > unsigned int account_id; > if(res.next() ){ > stat = session << "update event_prize set account_id=? ,award_time=now() > where prizeId=?" > << user->account_id() << p->id(); > stat.exec(); > guard.commit(); > //发送站内短信 > send_message(p , user , promo_id); > BOOSTER_NOTICE("award") << "obtain a real prize, the account_id is:" << > user->account_id() << ".the prize_id is:" << p->id(); > return p; > }else{ > guard.rollback(); > BOOSTER_NOTICE("award") << "already have got a prize, the account_id > is:"<< user->account_id() << ".the prize_id is:" << p->id(); > return create_default_prize(user,promo_id); > } > } > > Then I write a Java test application using TestNG to test my service > with 50 threads.But the service updates one record twice.Here is my log: > > 20071:2011-10-30 11:48:37 GMT; award, notice: obtain a real prize, the > account_id is:2011.the prize_id is:906326 (default_prize_policy.h:196) > 20074:2011-10-30 11:48:37 GMT; award, notice: already have got a prize, > the account_id is:2011.the prize_id is:906326 (default_prize_policy.h:200) > 20121:2011-10-30 11:48:37 GMT; award, notice: obtain a real prize, the > account_id is:2011.the prize_id is:906326 (default_prize_policy.h:196) > > Maybe it's a bug.Another question,How to change the transaction > isolation level for MySQL? > > > 陈抒 > Best regards > http://blog.csdn.net/sheismylife > > > > > ------------------------------------------------------------------------------ > Get your Android app more play: Bring it to the BlackBerry PlayBook > in minutes. BlackBerry App World™ now supports Android™ Apps > for the BlackBerry® PlayBook™. Discover just how easy and simple > it is! http://p.sf.net/sfu/android-dev2dev > > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > > > ------------------------------------------------------------------------------ > Get your Android app more play: Bring it to the BlackBerry PlayBook > in minutes. BlackBerry App World™ now supports Android™ Apps > for the BlackBerry® PlayBook™. Discover just how easy and simple > it is! http://p.sf.net/sfu/android-dev2dev > > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > > |
From: Artyom B. <art...@ya...> - 2011-10-30 14:00:16
|
To be honest I don't know I don't think it is problem with cppdb unless you show some specific case that I can reproduce. I can see 20071:2011-10-30 11:48:37 GMT; award, notice: obtain a real prize, the account_id is:2011.the prize_id is:906326 (default_prize_policy.h:196) 20121:2011-10-30 11:48:37 GMT; award, notice: obtain a real prize, the account_id is:2011.the prize_id is:906326 (default_prize_policy.h:196) Which looks exactly the same so it is not inconsistent. Maybe innodb allows to do updates if they do not conflict? I'd suggest to recheck carefully the SQL and other assumptions that transaction isolation provides (especially in MySQL). I'd also suggest to do this in one operation like this stmt = sql << "update event_prize set account_id=? ,award_time=now() where prizeId=? and account_id is NULL" << .... stmt.exec() if(stmt.affected() > 0) // awarded else // not awarder ------------------ About the isolation level. Shouldn't sql << "SET SESSION TRANSACTION ISOLATION Level" << cppdb::exec; work? Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.sf.net/ CppDB - C++ SQL Connectivity: http://cppcms.sf.net/sql/cppdb/ >________________________________ >From: 陈抒 <csf...@gm...> >To: cpp...@li... >Sent: Sunday, October 30, 2011 2:05 PM >Subject: Re: [Cppcms-users] Bug about transaction in cppdb > > >My table is using InnoDB engin. > > > | event_prize | CREATE TABLE `event_prize` ( > `prizeId` int(10) unsigned NOT NULL AUTO_INCREMENT, > `type_id` int(10) unsigned NOT NULL COMMENT '奖品类别Id', > `promo_id` int(10) unsigned NOT NULL COMMENT '活动Id', > `account_id` int(10) unsigned DEFAULT NULL COMMENT '获奖人', > `probility` int(10) unsigned DEFAULT NULL COMMENT '1-100之间,进入计算时会除以5000', > `flag` smallint(5) unsigned DEFAULT '0' COMMENT '0:用户可以在任何活动中反复获得;1:只能在一个活动中反复获得;2:每个活动中最多获得一个;3:只能在一个活动中获得一个;4:每个时间段内都确保发出;', > `status` smallint(5) unsigned DEFAULT '1' COMMENT '1激活 0 冻结', > `info` varchar(256) DEFAULT NULL COMMENT '保存奖品独特的特征信息', > `quantity` smallint(5) unsigned DEFAULT '0' COMMENT '一个奖品中标明的数量,比如金额', > `award_time` datetime DEFAULT NULL, > PRIMARY KEY (`prizeId`), > KEY `index_prize_event_promo` (`promo_id`), > KEY `index_prize_event_type` (`type_id`) >) ENGINE=InnoDB AUTO_INCREMENT=1174582 DEFAULT CHARSET=utf8 >陈抒 >Best regards >http://blog.csdn.net/sheismylife > > > >On Sun, Oct 30, 2011 at 8:04 PM, 陈抒 <csf...@gm...> wrote: > >Hello,Artyom: >> >> >> I run into one problem,I try to update one record in one MySQL table using transaction like so: >> >> >> static shared_ptr<prize> award(shared_ptr<prize> p,shared_ptr<user> user, int promo_id){ >> my_application & app = app_singleton_holder::Instance(); >> cppdb::session session(app.config().master_mysql_uri); >> cppdb::statement stat; >> >> cppdb::transaction guard(session); >> cppdb::result res = session <<"select account_id from event_prize where prizeId = ? and account_id is NULL"<< p->id(); >> unsigned int account_id; >> if(res.next() ){ >>stat = session << "update event_prize set account_id=? ,award_time=now() where prizeId=?" >> << user->account_id() << p->id(); >>stat.exec(); >>guard.commit(); >>//发送站内短信 >>send_message(p , user , promo_id); >>BOOSTER_NOTICE("award") << "obtain a real prize, the account_id is:" << user->account_id() << ".the prize_id is:" << p->id(); >>return p; >> }else{ >>guard.rollback(); >>BOOSTER_NOTICE("award") << "already have got a prize, the account_id is:"<< user->account_id() << ".the prize_id is:" << p->id(); >>return create_default_prize(user,promo_id); >> } >> } >> >> >> Then I write a Java test application using TestNG to test my service with 50 threads.But the service updates one record twice.Here is my log: >> >> >>20071:2011-10-30 11:48:37 GMT; award, notice: obtain a real prize, the account_id is:2011.the prize_id is:906326 (default_prize_policy.h:196) >>20074:2011-10-30 11:48:37 GMT; award, notice: already have got a prize, the account_id is:2011.the prize_id is:906326 (default_prize_policy.h:200) >>20121:2011-10-30 11:48:37 GMT; award, notice: obtain a real prize, the account_id is:2011.the prize_id is:906326 (default_prize_policy.h:196) >> >> >> Maybe it's a bug.Another question,How to change the transaction isolation level for MySQL? >> >> >>陈抒 >>Best regards >>http://blog.csdn.net/sheismylife >> > >------------------------------------------------------------------------------ >Get your Android app more play: Bring it to the BlackBerry PlayBook >in minutes. BlackBerry App World™ now supports Android™ Apps >for the BlackBerry® PlayBook™. Discover just how easy and simple >it is! http://p.sf.net/sfu/android-dev2dev > >_______________________________________________ >Cppcms-users mailing list >Cpp...@li... >https://lists.sourceforge.net/lists/listinfo/cppcms-users > > > |
From: 陈抒 <csf...@gm...> - 2011-10-30 12:06:13
|
My table is using InnoDB engin. | event_prize | CREATE TABLE `event_prize` ( `prizeId` int(10) unsigned NOT NULL AUTO_INCREMENT, `type_id` int(10) unsigned NOT NULL COMMENT '奖品类别Id', `promo_id` int(10) unsigned NOT NULL COMMENT '活动Id', `account_id` int(10) unsigned DEFAULT NULL COMMENT '获奖人', `probility` int(10) unsigned DEFAULT NULL COMMENT '1-100之间,进入计算时会除以5000', `flag` smallint(5) unsigned DEFAULT '0' COMMENT '0:用户可以在任何活动中反复获得;1:只能在一个活动中反复获得;2:每个活动中最多获得一个;3:只能在一个活动中获得一个;4:每个时间段内都确保发出;', `status` smallint(5) unsigned DEFAULT '1' COMMENT '1激活 0 冻结', `info` varchar(256) DEFAULT NULL COMMENT '保存奖品独特的特征信息', `quantity` smallint(5) unsigned DEFAULT '0' COMMENT '一个奖品中标明的数量,比如金额', `award_time` datetime DEFAULT NULL, PRIMARY KEY (`prizeId`), KEY `index_prize_event_promo` (`promo_id`), KEY `index_prize_event_type` (`type_id`) ) ENGINE=InnoDB AUTO_INCREMENT=1174582 DEFAULT CHARSET=utf8 陈抒 Best regards http://blog.csdn.net/sheismylife On Sun, Oct 30, 2011 at 8:04 PM, 陈抒 <csf...@gm...> wrote: > Hello,Artyom: > > I run into one problem,I try to update one record in one MySQL table > using transaction like so: > > static shared_ptr<prize> award(shared_ptr<prize> p,shared_ptr<user> > user, int promo_id){ > my_application & app = app_singleton_holder::Instance(); > cppdb::session session(app.config().master_mysql_uri); > cppdb::statement stat; > > cppdb::transaction guard(session); > cppdb::result res = session <<"select account_id from event_prize > where prizeId = ? and account_id is NULL"<< p->id(); > unsigned int account_id; > if(res.next() ){ > stat = session << "update event_prize set account_id=? ,award_time=now() > where prizeId=?" > << user->account_id() << p->id(); > stat.exec(); > guard.commit(); > //发送站内短信 > send_message(p , user , promo_id); > BOOSTER_NOTICE("award") << "obtain a real prize, the account_id is:" << > user->account_id() << ".the prize_id is:" << p->id(); > return p; > }else{ > guard.rollback(); > BOOSTER_NOTICE("award") << "already have got a prize, the account_id > is:"<< user->account_id() << ".the prize_id is:" << p->id(); > return create_default_prize(user,promo_id); > } > } > > Then I write a Java test application using TestNG to test my service > with 50 threads.But the service updates one record twice.Here is my log: > > 20071:2011-10-30 11:48:37 GMT; award, notice: obtain a real prize, the > account_id is:2011.the prize_id is:906326 (default_prize_policy.h:196) > 20074:2011-10-30 11:48:37 GMT; award, notice: already have got a prize, > the account_id is:2011.the prize_id is:906326 (default_prize_policy.h:200) > 20121:2011-10-30 11:48:37 GMT; award, notice: obtain a real prize, the > account_id is:2011.the prize_id is:906326 (default_prize_policy.h:196) > > Maybe it's a bug.Another question,How to change the transaction > isolation level for MySQL? > > > 陈抒 > Best regards > http://blog.csdn.net/sheismylife > |
From: 陈抒 <csf...@gm...> - 2011-10-30 12:04:54
|
Hello,Artyom: I run into one problem,I try to update one record in one MySQL table using transaction like so: static shared_ptr<prize> award(shared_ptr<prize> p,shared_ptr<user> user, int promo_id){ my_application & app = app_singleton_holder::Instance(); cppdb::session session(app.config().master_mysql_uri); cppdb::statement stat; cppdb::transaction guard(session); cppdb::result res = session <<"select account_id from event_prize where prizeId = ? and account_id is NULL"<< p->id(); unsigned int account_id; if(res.next() ){ stat = session << "update event_prize set account_id=? ,award_time=now() where prizeId=?" << user->account_id() << p->id(); stat.exec(); guard.commit(); //发送站内短信 send_message(p , user , promo_id); BOOSTER_NOTICE("award") << "obtain a real prize, the account_id is:" << user->account_id() << ".the prize_id is:" << p->id(); return p; }else{ guard.rollback(); BOOSTER_NOTICE("award") << "already have got a prize, the account_id is:"<< user->account_id() << ".the prize_id is:" << p->id(); return create_default_prize(user,promo_id); } } Then I write a Java test application using TestNG to test my service with 50 threads.But the service updates one record twice.Here is my log: 20071:2011-10-30 11:48:37 GMT; award, notice: obtain a real prize, the account_id is:2011.the prize_id is:906326 (default_prize_policy.h:196) 20074:2011-10-30 11:48:37 GMT; award, notice: already have got a prize, the account_id is:2011.the prize_id is:906326 (default_prize_policy.h:200) 20121:2011-10-30 11:48:37 GMT; award, notice: obtain a real prize, the account_id is:2011.the prize_id is:906326 (default_prize_policy.h:196) Maybe it's a bug.Another question,How to change the transaction isolation level for MySQL? 陈抒 Best regards http://blog.csdn.net/sheismylife |
From: 陈抒 <csf...@gm...> - 2011-10-29 05:22:18
|
I tested newest version cppcms-0.99.10.1 on three computers(two UBuntu server and one UBuntu desktop),All tests passed now. 陈抒 Best regards http://blog.csdn.net/sheismylife On Wed, Oct 19, 2011 at 2:52 PM, 陈抒 <csf...@gm...> wrote: > I am on holiday now.Will collect necessary info for my questions at the end > of this month. > Thank you. > > 陈抒 > Best regards > http://blog.csdn.net/sheismylife > > > > On Mon, Oct 17, 2011 at 2:36 AM, Artyom Beilis <art...@ya...>wrote: > >> >> --- On Fri, 10/14/11, chenshu <csf...@gm...> wrote: >> >> > From: chenshu <csf...@gm...> >> > Subject: Re: [Cppcms-users] Compile error on UBuntu11.10 >> > To: cpp...@li... >> > Date: Friday, October 14, 2011, 8:15 AM >> > The compile error was fixed after >> > install PCRE_LIB. >> > >> > But some test cases failed: >> > >> > The following tests FAILED: >> > 22 - file_server_test (Failed) >> > 23 - file_server_with_listing_test >> > (Failed) >> > Errors while running CTest >> > >> > >> >> >> Can you please send me the content of the Test log so I can >> see what exactly fails. >> >> It can be found in your build directory in >> >> Testing/Temporary/LastTest.log >> >> >> Artyom Beilis >> >> >> >> >> ------------------------------------------------------------------------------ >> All the data continuously generated in your IT infrastructure contains a >> definitive record of customers, application performance, security >> threats, fraudulent activity and more. Splunk takes this data and makes >> sense of it. Business sense. IT sense. Common sense. >> http://p.sf.net/sfu/splunk-d2d-oct >> _______________________________________________ >> Cppcms-users mailing list >> Cpp...@li... >> https://lists.sourceforge.net/lists/listinfo/cppcms-users >> > > |
From: <un...@fu...> - 2011-10-28 06:47:31
|
i have ajax form submitting integrated with facebox pop up windows, if interested. as i see, project wiki doesn't support uploading files, but it shouldn't stop us from sharing som basic scripts & solutions in a systematic way. in a short time i'm going to look at uploading big files (chunks support) with plupload and mongodb backend. or does anybody have (first part of) this? pavel. On Thu, 27 Oct 2011 18:13:04 -0700, Richard Catlin wrote: > Is there a sample of how to integrate cppcms and jQuery? > > In general are your widgets just html based or is there some > javascript embedded in the widget? Is so, what library and which > class would be the best for me to look at as an example of how to > integrate cppcms with html/javascript? Is there some design pattern > you are following? > > Richard Catlin |
From: 陈抒 <csf...@gm...> - 2011-10-28 02:33:26
|
I wrote one function recently.My JavaScript function calls CppCMS web method via JSONP.Here is one example. client side in html: <script type="text/javascript"> function save_email(){ var message=document.getElementById("email_content").value; $.ajax({ "url": "http://www.cmlelectronics.com:8080/save_email?content= "+message+"&callback=?", type:"get", dataType:"jsonp", jsonp:"callback", success:function(data){ alert(data.result); }, error:function(err){ alert(err.result); }, complete: function(msg){ } }); } </script> Server side: hello::hello(cppcms::service &srv):cppcms::application(srv){ ,.. dispatcher().assign("/save_email?(.+)" , &hello::save_email , this , 3); ... } //test url http://IP/save_email?content=...&callback=jsonp void hello::save_message(std::string str){ BOOSTER_NOTICE("hello") << "Enter save_message function"; std::string wrapper_function = request().get("callback"); try{ std::string content = request().get("content"); auto_ptr<cppdb::session> session = sql_session_factory::create_session(); cppdb::statement stat; //do something stat.exec(); response().out() << wrapper_function <<'('; response().out()<<"{result:\"Your message has been saved successfully,please wait!\"}"; response().out() << ')'; }catch(std::exception &ex){ response().out() << wrapper_function <<'('; response().out()<<"{result:\""<<ex.what()<<"\"}"; response().out() << ')'; } } 陈抒 Best regards http://blog.csdn.net/sheismylife On Fri, Oct 28, 2011 at 9:13 AM, Richard Catlin <ric...@gm...>wrote: > Is there a sample of how to integrate cppcms and jQuery? > > In general are your widgets just html based or is there some javascript > embedded in the widget? Is so, what library and which class would be the > best for me to look at as an example of how to integrate cppcms with > html/javascript? Is there some design pattern you are following? > > Richard Catlin > > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------------ > The demand for IT networking professionals continues to grow, and the > demand for specialized networking skills is growing even more rapidly. > Take a complimentary Learning@Cisco Self-Assessment and learn > about Cisco certifications, training, and career opportunities. > http://p.sf.net/sfu/cisco-dev2dev > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
From: Richard C. <ric...@gm...> - 2011-10-28 01:13:14
|
Is there a sample of how to integrate cppcms and jQuery? In general are your widgets just html based or is there some javascript embedded in the widget? Is so, what library and which class would be the best for me to look at as an example of how to integrate cppcms with html/javascript? Is there some design pattern you are following? Richard Catlin |
From: Artyom B. <art...@ya...> - 2011-10-26 07:04:14
|
> > Is there an example of how to handle an uploaded image in the cppCMS app server? > Take a look on cppcms::widgets::file class http://art-blog.no-ip.info/cppcms_ref_v0_99/classcppcms_1_1widgets_1_1file.html It allows you to upload files via ordinary forms. Don't forget to use "multipart/form-data" as encoding in the form. > Currently, I am POSTing jQuery form data to cppcms::rpc::json_rpc_server. > Note: 1. The JSON format does not support binary data. 2. Best way to upload files is to use native browser support. So use ordinary form for file upload. Artyom |
From: Richard C. <ric...@gm...> - 2011-10-26 00:22:02
|
Is there an example of how to handle an uploaded image in the cppCMS app server? Currently, I am POSTing jQuery form data to cppcms::rpc::json_rpc_server. Richard |
From: Artyom B. <art...@ya...> - 2011-10-19 08:27:18
|
Hello, CppCMS 0.99.10.1 was released today. It is a bug fix release that includes fixes for several critical bugs that could not wait for 0.99.11 version. It had also included some trivial bug fixes that could be merged easily to this version from trunk. Critical Bugs: - Fixed a bug that caused an infinite loop in `shared_ptr` counter on Windows platform when multi-core machines are used. - Fixed a bug that prevented from lock file to be created in demonetization process (regression in 0.99.10) - Fixed a bug that prevented CppCMS process to shutdown properly when running in prefork mode (regression in 0.99.10). - Fixed a bug that prevented from JSON-RPC notifications work properly. Other bugs: - Fixed typo (#3404317) - Fixed a race condition in access to socket that may occur in some situations on multi-core machines. - Fixed `booster::nowide::fstream` to follow open flags specifications properly in some cases. All CppCMS users are encouraged to upgrade to this version - especially windows users. Note for CppCMS trunk users: The daemon's lock-file bug and the prefork bug still exists in trunk version. CppCMS 0.99.10.1 includes a workaround (that makes things work) but it would take some to implement the proper solution in the trunk. See: http://en.wikipedia.org/wiki/Fix_it_twice Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.sf.net/ CppDB - C++ SQL Connectivity: http://cppcms.sf.net/sql/cppdb/ |
From: 陈抒 <csf...@gm...> - 2011-10-19 06:52:40
|
I am on holiday now.Will collect necessary info for my questions at the end of this month. Thank you. 陈抒 Best regards http://blog.csdn.net/sheismylife On Mon, Oct 17, 2011 at 2:36 AM, Artyom Beilis <art...@ya...> wrote: > > --- On Fri, 10/14/11, chenshu <csf...@gm...> wrote: > > > From: chenshu <csf...@gm...> > > Subject: Re: [Cppcms-users] Compile error on UBuntu11.10 > > To: cpp...@li... > > Date: Friday, October 14, 2011, 8:15 AM > > The compile error was fixed after > > install PCRE_LIB. > > > > But some test cases failed: > > > > The following tests FAILED: > > 22 - file_server_test (Failed) > > 23 - file_server_with_listing_test > > (Failed) > > Errors while running CTest > > > > > > > Can you please send me the content of the Test log so I can > see what exactly fails. > > It can be found in your build directory in > > Testing/Temporary/LastTest.log > > > Artyom Beilis > > > > > ------------------------------------------------------------------------------ > All the data continuously generated in your IT infrastructure contains a > definitive record of customers, application performance, security > threats, fraudulent activity and more. Splunk takes this data and makes > sense of it. Business sense. IT sense. Common sense. > http://p.sf.net/sfu/splunk-d2d-oct > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |
From: Artyom B. <art...@ya...> - 2011-10-16 18:37:22
|
--- On Fri, 10/14/11, chenshu <csf...@gm...> wrote: > From: chenshu <csf...@gm...> > Subject: Re: [Cppcms-users] Compile error on UBuntu11.10 > To: cpp...@li... > Date: Friday, October 14, 2011, 8:15 AM > The compile error was fixed after > install PCRE_LIB. > > But some test cases failed: > > The following tests FAILED: > 22 - file_server_test (Failed) > 23 - file_server_with_listing_test > (Failed) > Errors while running CTest > > Can you please send me the content of the Test log so I can see what exactly fails. It can be found in your build directory in Testing/Temporary/LastTest.log Artyom Beilis |
From: Artyom B. <art...@ya...> - 2011-10-16 18:32:20
|
> I tried booster::log today.If I added > sink explicitly below,it worked > fine,and I could see the log info in log file. > > void init_log(){ > booster::shared_ptr<booster::log::sinks::file> > f(new > booster::log::sinks::file()); > f->open("my_log"); > booster::log::logger::instance().add_sink(f); > } > > int main(int argc,char ** argv){ > > try { > init_log(); > BOOSTER_ERROR("module") << > "Message " << 3.14159; > .... > } > > 2011-10-13 06:18:44 GMT; module, error: Message 3.14159 > (main.cpp:72) > > > But if I configured it in config.js like > so,I couldn't see any log > info,only log file was created. > > "logging":{ > "level":"debug", > "file":{ > "name":"km_log", > "append":false, > "max_files":100 > } > } > > I looked into your codes and found some code here: > std::string log_file; > > if(!(log_file=settings().get("logging.file.name","")).empty()) > { > > booster::shared_ptr<sinks::file> > file(new sinks::file()); > int max_files=0; > if((max_files = > settings().get("logging.file.max_files",0)) > 0) > > file->max_files(max_files); > bool append = > false; > if((append = > settings().get("logging.file.append",false))==true) > > file->append(); > > file->open(log_file); > > logger::instance().add_sink(file); > } > > It looked the same as mine code.So no idea now. > Where do you log the data? Can you be more specific? Are you sure you get to the log part? Do you see log file created? files rotated? Small (full) sample would help me to figure out what is the problem. Artyom |
From: Artyom B. <art...@ya...> - 2011-10-16 18:29:34
|
It is regression (a bug) in 0.99.10 that was introduced when Windows service support was added. Unfortunately this part had no unit test (as it is quite hard to do) so it will be fixed in 0.99.11. Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.sf.net/ CppDB - C++ SQL Connectivity: http://cppcms.sf.net/sql/cppdb/ --- On Thu, 10/13/11, 60...@su... <60...@su...> wrote: From: 60...@su... <60...@su...> Subject: Re: [Cppcms-users] daemon.lock question To: cpp...@li... Date: Thursday, October 13, 2011, 10:30 AM Regards, Allan SIMON ----- Reply message ----- From: "chenshu" <csf...@gm...> To: <cpp...@li...> Subject: [Cppcms-users] daemon.lock question Date: Wed, Oct 12, 2011 3:14 am Hi, I tried daemon configuration last night.See below: "daemon":{ "enable":true, "lock":"km_process", "fdlimit":1024 } "enable":true works fine,it forks a new process and I don't need to type '&' command now. but km_process file is not generated.Why? ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2d-oct _______________________________________________ Cppcms-users mailing list Cpp...@li... https://lists.sourceforge.net/lists/listinfo/cppcms-users -----Inline Attachment Follows----- ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2d-oct -----Inline Attachment Follows----- _______________________________________________ Cppcms-users mailing list Cpp...@li... https://lists.sourceforge.net/lists/listinfo/cppcms-users |
From: chenshu <csf...@gm...> - 2011-10-14 06:40:12
|
It was fixed after installing PCRE_LIB. But two test cases about file server failed,why? On 10/14/2011 01:57 PM, chenshu wrote: > Before releasing my first service based on CppCMS,I tried UBuntu 11.10 > amd64 server today.Unfortunately, I got the following error when > executed 'cmake -DCMAKE_INSTALL_PREFIX=/usr ..' command: > > root@n2:/usr/src/cppcms-0.99.10/build# cmake > -DCMAKE_INSTALL_PREFIX=/usr .. > CMake Warning at /usr/share/cmake-2.8/Modules/CPack.cmake:236 (MESSAGE): > CPack.cmake has already been included!! > Call Stack (most recent call first): > booster/CMakeLists.txt:14 (include) > > > -- Looking for ICU libraries > -- ICU Found, building booster locale > CMake Error: The following variables are used in this project, but > they are set to NOTFOUND. > Please set them or make sure they are set and tested correctly in the > CMake files: > PCRE_LIB > linked by target "booster" in directory > /usr/src/cppcms-0.99.10/booster > linked by target "booster-static" in directory > /usr/src/cppcms-0.99.10/booster > > -- Configuring incomplete, errors occurred! > |
From: chenshu <csf...@gm...> - 2011-10-14 06:15:33
|
The compile error was fixed after install PCRE_LIB. But some test cases failed: The following tests FAILED: 22 - file_server_test (Failed) 23 - file_server_with_listing_test (Failed) Errors while running CTest On 10/14/2011 01:57 PM, chenshu wrote: > Before releasing my first service based on CppCMS,I tried UBuntu 11.10 > amd64 server today.Unfortunately, I got the following error when > executed 'cmake -DCMAKE_INSTALL_PREFIX=/usr ..' command: > > root@n2:/usr/src/cppcms-0.99.10/build# cmake > -DCMAKE_INSTALL_PREFIX=/usr .. > CMake Warning at /usr/share/cmake-2.8/Modules/CPack.cmake:236 (MESSAGE): > CPack.cmake has already been included!! > Call Stack (most recent call first): > booster/CMakeLists.txt:14 (include) > > > -- Looking for ICU libraries > -- ICU Found, building booster locale > CMake Error: The following variables are used in this project, but > they are set to NOTFOUND. > Please set them or make sure they are set and tested correctly in the > CMake files: > PCRE_LIB > linked by target "booster" in directory > /usr/src/cppcms-0.99.10/booster > linked by target "booster-static" in directory > /usr/src/cppcms-0.99.10/booster > > -- Configuring incomplete, errors occurred! > |
From: chenshu <csf...@gm...> - 2011-10-14 05:58:11
|
Before releasing my first service based on CppCMS,I tried UBuntu 11.10 amd64 server today.Unfortunately, I got the following error when executed 'cmake -DCMAKE_INSTALL_PREFIX=/usr ..' command: root@n2:/usr/src/cppcms-0.99.10/build# cmake -DCMAKE_INSTALL_PREFIX=/usr .. CMake Warning at /usr/share/cmake-2.8/Modules/CPack.cmake:236 (MESSAGE): CPack.cmake has already been included!! Call Stack (most recent call first): booster/CMakeLists.txt:14 (include) -- Looking for ICU libraries -- ICU Found, building booster locale CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: PCRE_LIB linked by target "booster" in directory /usr/src/cppcms-0.99.10/booster linked by target "booster-static" in directory /usr/src/cppcms-0.99.10/booster -- Configuring incomplete, errors occurred! |
From: <60...@su...> - 2011-10-13 08:45:55
|
Regards, Allan SIMON ----- Reply message ----- From: "chenshu" <csf...@gm...> To: <cpp...@li...> Subject: [Cppcms-users] daemon.lock question Date: Wed, Oct 12, 2011 3:14 am Hi, I tried daemon configuration last night.See below: "daemon":{ "enable":true, "lock":"km_process", "fdlimit":1024 } "enable":true works fine,it forks a new process and I don't need to type '&' command now. but km_process file is not generated.Why? ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2d-oct _______________________________________________ Cppcms-users mailing list Cpp...@li... https://lists.sourceforge.net/lists/listinfo/cppcms-users |
From: chenshu <csf...@gm...> - 2011-10-13 06:29:46
|
Hello, I tried booster::log today.If I added sink explicitly below,it worked fine,and I could see the log info in log file. void init_log(){ booster::shared_ptr<booster::log::sinks::file> f(new booster::log::sinks::file()); f->open("my_log"); booster::log::logger::instance().add_sink(f); } int main(int argc,char ** argv){ try { init_log(); BOOSTER_ERROR("module") << "Message " << 3.14159; .... } 2011-10-13 06:18:44 GMT; module, error: Message 3.14159 (main.cpp:72) But if I configured it in config.js like so,I couldn't see any log info,only log file was created. "logging":{ "level":"debug", "file":{ "name":"km_log", "append":false, "max_files":100 } } I looked into your codes and found some code here: std::string log_file; if(!(log_file=settings().get("logging.file.name","")).empty()) { booster::shared_ptr<sinks::file> file(new sinks::file()); int max_files=0; if((max_files = settings().get("logging.file.max_files",0)) > 0) file->max_files(max_files); bool append = false; if((append = settings().get("logging.file.append",false))==true) file->append(); file->open(log_file); logger::instance().add_sink(file); } It looked the same as mine code.So no idea now. |
From: Artyom B. <art...@ya...> - 2011-10-12 09:06:14
|
Confirmed. Fill a bug :-) I'll take a look on it this weekend. Artyom Beilis -------------- CppCMS - C++ Web Framework: http://cppcms.sf.net/ CppDB - C++ SQL Connectivity: http://cppcms.sf.net/sql/cppdb/ --- On Wed, 10/12/11, chenshu <csf...@gm...> wrote: > From: chenshu <csf...@gm...> > Subject: [Cppcms-users] daemon.lock question > To: cpp...@li... > Date: Wednesday, October 12, 2011, 3:14 AM > Hi, > I tried daemon configuration last > night.See below: > "daemon":{ > "enable":true, > "lock":"km_process", > "fdlimit":1024 > } > > "enable":true works fine,it forks a new process and I don't > need to type > '&' command now. > but km_process file is not generated.Why? > > ------------------------------------------------------------------------------ > All the data continuously generated in your IT > infrastructure contains a > definitive record of customers, application performance, > security > threats, fraudulent activity and more. Splunk takes this > data and makes > sense of it. Business sense. IT sense. Common sense. > http://p.sf.net/sfu/splunk-d2d-oct > _______________________________________________ > Cppcms-users mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppcms-users > |