# How to redirect all logs to a file from initLicode.sh?

**URL:** https://discourse.lynckia.com/t/how-to-redirect-all-logs-to-a-file-from-initlicode-sh/133
**Category:** Uncategorized
**Created:** [July 30, 2014, 12:33am UTC](https://discourse.lynckia.com/t/how-to-redirect-all-logs-to-a-file-from-initlicode-sh/133 "2014-07-30T00:33:07Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![evk020202](https://avatars.discourse-cdn.com/v4/letter/e/71e660/32.png) [@evk020202](https://discourse.lynckia.com/u/evk020202)
#### Post date: [July 30, 2014, 12:33am UTC](https://discourse.lynckia.com/t/how-to-redirect-all-logs-to-a-file-from-initlicode-sh/133/1 "2014-07-30T00:33:07Z")

</div>

Hi,  
It’s nice to see all the logs [initLicode.sh](http://initLicode.sh) write (erizo?), but it would be  
nice if it would go into a log file.  
While I could do that easily for [initBasicExample.sh](http://initBasicExample.sh) by using:  
./licode/initBasicExample.sh \>\> licode/basicexample\_log

I couldn’t do the same with [initLicode.sh](http://initLicode.sh) because that is calling other  
services, so I would need to go down to each and add this. Is there a  
built-in way in Licode already to get all the logs to some log files?

Thanks

---

<div class="post-metadata">

### Author: ![evk020202](https://avatars.discourse-cdn.com/v4/letter/e/71e660/32.png) [@evk020202](https://discourse.lynckia.com/u/evk020202)
#### Post date: [August 1, 2014, 4:33pm UTC](https://discourse.lynckia.com/t/how-to-redirect-all-logs-to-a-file-from-initlicode-sh/133/2 "2014-08-01T16:33:56Z")

</div>

Thanks, but I have no problem keeping the logging up after closing the  
console even with  
./licode/scripts/initLicode.sh \>\> ./licode/initLicode.log 2\>&1  
./licode/scripts/initBasicExample.sh \>\> ./licode/initBasicExample.log 2\>&1On Friday, August 1, 2014 10:03:51 AM UTC-4, Konstantin Aleksandrov wrote:

> Consider also  
> nohup ./licode/scripts/initLicode.sh &
> 
> This will make able to close the parent process (the console for example)  
> still having Licode running in background and all its logs will be dumped  
> into nohup.out file created in the same directory.
> 
> On Thursday, July 31, 2014 9:46:02 PM UTC+2, [evk0...@gmail.com](mailto:evk0...@gmail.com) wrote:
> 
> > Thanks, that is perfect.  
> > I will use the below (\>\> so it doesn’t overwrites the previous log after  
> > a restart):
> > 
> > ./licode/scripts/initLicode.sh \>\> ./licode/initLicode.log 2\>&1  
> > ./licode/scripts/initBasicExample.sh \>\> ./licode/initBasicExample.log 2\>&1
> > 
> > On Thursday, July 31, 2014 7:56:54 AM UTC-4, Sergio Gómez wrote:
> > 
> > > I use:
> > > 
> > > ./licode/scripts/initLicode.sh \> initLicode.log 2\>&1  
> > > ./licode/scripts/initBasicExample.sh \> initBasicExample.log 2\>&1
> > > 
> > > I think I get all logs in both files.
> > > 
> > > Sergio.
> > > 
> > > El miércoles, 30 de julio de 2014 02:33:07 UTC+2, [evk0...@gmail.com](mailto:evk0...@gmail.com) escribió:
> > > 
> > > > Hi,  
> > > > It’s nice to see all the logs initLicode.sh write (erizo?), but it  
> > > > would be nice if it would go into a log file.  
> > > > While I could do that easily for initBasicExample.sh by using:  
> > > > ./licode/initBasicExample.sh \>\> licode/basicexample\_log
> > > > 
> > > > I couldn’t do the same with initLicode.sh because that is calling other  
> > > > services, so I would need to go down to each and add this. Is there a  
> > > > built-in way in Licode already to get all the logs to some log files?
> > > > 
> > > > Thanks

---

<div class="post-metadata">

### Author: ![evk020202](https://avatars.discourse-cdn.com/v4/letter/e/71e660/32.png) [@evk020202](https://discourse.lynckia.com/u/evk020202)
#### Post date: [July 31, 2014, 7:46pm UTC](https://discourse.lynckia.com/t/how-to-redirect-all-logs-to-a-file-from-initlicode-sh/133/3 "2014-07-31T19:46:02Z")

</div>

Thanks, that is perfect.  
I will use the below (\>\> so it doesn’t overwrites the previous log after a  
restart):

./licode/scripts/initLicode.sh \>\> ./licode/initLicode.log 2\>&1  
./licode/scripts/initBasicExample.sh \>\> ./licode/initBasicExample.log 2\>&1On Thursday, July 31, 2014 7:56:54 AM UTC-4, Sergio Gómez wrote:

> I use:
> 
> ./licode/scripts/initLicode.sh \> initLicode.log 2\>&1  
> ./licode/scripts/initBasicExample.sh \> initBasicExample.log 2\>&1
> 
> I think I get all logs in both files.
> 
> Sergio.
> 
> El miércoles, 30 de julio de 2014 02:33:07 UTC+2, [evk0...@gmail.com](mailto:evk0...@gmail.com) escribió:
> 
> > Hi,  
> > It’s nice to see all the logs initLicode.sh write (erizo?), but it would  
> > be nice if it would go into a log file.  
> > While I could do that easily for initBasicExample.sh by using:  
> > ./licode/initBasicExample.sh \>\> licode/basicexample\_log
> > 
> > I couldn’t do the same with initLicode.sh because that is calling other  
> > services, so I would need to go down to each and add this. Is there a  
> > built-in way in Licode already to get all the logs to some log files?
> > 
> > Thanks

---

<div class="post-metadata">

### Author: ![Konstantin\_Aleksandr](https://avatars.discourse-cdn.com/v4/letter/k/9dc877/32.png) [@Konstantin\_Aleksandr](https://discourse.lynckia.com/u/Konstantin_Aleksandr)
#### Post date: [August 1, 2014, 2:03pm UTC](https://discourse.lynckia.com/t/how-to-redirect-all-logs-to-a-file-from-initlicode-sh/133/4 "2014-08-01T14:03:50Z")

</div>

Consider also  
nohup ./licode/scripts/initLicode.sh &

This will make able to close the parent process (the console for example)  
still having Licode running in background and all its logs will be dumped  
into nohup.out file created in the same directory.On Thursday, July 31, 2014 9:46:02 PM UTC+2, [evk0...@gmail.com](mailto:evk0...@gmail.com) wrote:

> Thanks, that is perfect.  
> I will use the below (\>\> so it doesn’t overwrites the previous log after a  
> restart):
> 
> ./licode/scripts/initLicode.sh \>\> ./licode/initLicode.log 2\>&1  
> ./licode/scripts/initBasicExample.sh \>\> ./licode/initBasicExample.log 2\>&1
> 
> On Thursday, July 31, 2014 7:56:54 AM UTC-4, Sergio Gómez wrote:
> 
> > I use:
> > 
> > ./licode/scripts/initLicode.sh \> initLicode.log 2\>&1  
> > ./licode/scripts/initBasicExample.sh \> initBasicExample.log 2\>&1
> > 
> > I think I get all logs in both files.
> > 
> > Sergio.
> > 
> > El miércoles, 30 de julio de 2014 02:33:07 UTC+2, [evk0...@gmail.com](mailto:evk0...@gmail.com) escribió:
> > 
> > > Hi,  
> > > It’s nice to see all the logs initLicode.sh write (erizo?), but it would  
> > > be nice if it would go into a log file.  
> > > While I could do that easily for initBasicExample.sh by using:  
> > > ./licode/initBasicExample.sh \>\> licode/basicexample\_log
> > > 
> > > I couldn’t do the same with initLicode.sh because that is calling other  
> > > services, so I would need to go down to each and add this. Is there a  
> > > built-in way in Licode already to get all the logs to some log files?
> > > 
> > > Thanks

---

<div class="post-metadata">

### Author: ![Sergio\_Gomez](https://avatars.discourse-cdn.com/v4/letter/s/e47c2d/32.png) [@Sergio\_Gomez](https://discourse.lynckia.com/u/Sergio_Gomez)
#### Post date: [July 31, 2014, 11:56am UTC](https://discourse.lynckia.com/t/how-to-redirect-all-logs-to-a-file-from-initlicode-sh/133/5 "2014-07-31T11:56:54Z")

</div>

I use:

./licode/scripts/initLicode.sh \> initLicode.log 2\>&1  
./licode/scripts/initBasicExample.sh \> initBasicExample.log 2\>&1

I think I get all logs in both files.

Sergio.El miércoles, 30 de julio de 2014 02:33:07 UTC+2, [evk0...@gmail.com](mailto:evk0...@gmail.com) escribió:

> Hi,  
> It’s nice to see all the logs initLicode.sh write (erizo?), but it would  
> be nice if it would go into a log file.  
> While I could do that easily for initBasicExample.sh by using:  
> ./licode/initBasicExample.sh \>\> licode/basicexample\_log
> 
> I couldn’t do the same with initLicode.sh because that is calling other  
> services, so I would need to go down to each and add this. Is there a  
> built-in way in Licode already to get all the logs to some log files?
> 
> Thanks
